s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
voting
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
Voting is open. Play the entries and pick the winner.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Components
Collider
ComputePenetration
chevron_left
Components
class
Collider
Constructors
lock
Collider
Fields
lock
_keyframeBody
Properties
data_object
ColliderFlags
data_object
Elasticity
data_object
Friction
data_object
IsConcave
data_object
IsDynamic
data_object
IsTrigger
data_object
Joints
remove_circle
KeyframeBody
data_object
LocalBounds
data_object
OnObjectTriggerEnter
data_object
OnObjectTriggerExit
data_object
OnTriggerEnter
data_object
OnTriggerExit
data_object
Rigidbody
data_object
RollingResistance
data_object
Static
data_object
Surface
data_object
SurfaceVelocity
data_object
Touching
Methods
lock
CalculateLocalBounds
functions
ComputePenetration
lock
ConfigureShapes
remove_circle
CreatePhysicsShapes
functions
FindClosestPoint
functions
GetVelocityAtPoint
functions
GetWorldBounds
remove_circle
OnPhysicsChanged
lock
Rebuild
lock
RebuildImmediately
ComputePenetration
Finds the smallest move needed to separate this collider from another, ignoring all collision rules. Returns true if they're overlapping; moving this collider by <paramref name="direction" /> * <paramref name="distance" /> pushes it clear.
method
bool
ComputePenetration
(
Collider
other
,
out
Vector3
direction
,
out
float
distance
)
Parameters
Name
Type
Description
other
Collider
out
direction
Vector3
out
distance
float
Returns
Type
Description
bool
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.