Script v1.4.4.0
Engine v7.0.0.2
- General
- Entity
- Node
- Scenegraph
- Lighting
- Camera
- Shape
- Particle System
- Physics
- addDifferential
- addForce
- addImpulse
- addToPhysics
- addTorque
- addTorqueImpulse
- addVehicleLink
- computeWheelShapeTireForces
- createCCT
- createWheelShape
- getAngularDamping
- getAngularVelocity
- getCCTCollisionFlags
- getCenterOfMass
- getCollisionMask
- getDensity
- getLinearDamping
- getLinearVelocity
- getMass
- getMotorRotationSpeed
- getRigidBodyType
- getVelocityAtLocalPos
- getVelocityAtWorldPos
- getVolume
- getWheelShapeAxleSpeed
- getWheelShapeContactForce
- getWheelShapeContactNormal
- getWheelShapeContactObject
- getWheelShapeContactPoint
- getWheelShapePosition
- getWheelShapeSlip
- JointConstructor:setActors
- JointConstructor:setJointTransforms
- moveCCT
- overlapBox
- overlapSphere
- raycastAll
- raycastClosest
- removeAllDifferentials
- removeCCT
- removeFromPhysics
- setAngularDamping
- setAngularVelocity
- setCenterOfMass
- setCollisionMask
- setFrictionVelocity
- setJointDrive
- setLinearDamping
- setLinearVelocity
- setMass
- setRigidBodyType
- setSolverIterationCount
- setVehicleProps
- setWheelShapeForcePoint
- setWheelShapeProps
- setWheelShapeTireFriction
- simulatePhysics
- simulatePhysicsTimeScale
- updateDifferential
- Spline
- Animation
- Overlays
- Sound
- Input
- XML
- Network
- Callbacks
- Text Rendering
- Terrain Detail
- Tire Track
- Editor
- Rendering
- String
- Math
- I3D
- Fillplanes
Foundation Reference
raycastClosest
DescriptionRaycast closest object, see raycast callback functionDefinition
raycastClosest(float x, float y, float z, float nx, float ny, float nz, string raycastFunctionCallback, float maxDistance, object targetObject, integer collisionMask, boolean generateNormal)Arguments
float | x | origin x |
float | y | origin y |
float | z | origin z |
float | nx | direction x |
float | ny | direction y |
float | nz | direction z |
string | raycastFunctionCallback | raycast function callback. see raycast callback function |
float | maxDistance | max distance |
object | targetObject | target object (optional), the callback function is called as a member function of targetobject (default nil) |
integer | collisionMask | collision mask (optional), the mask to filter colliding objects (default 0xffffffff) |
boolean | generateNormal | generate normal (optional), if set and true, the normal at the collision point is passed as arguments to the callback function (default false) |
integer | numShapes | number of shapes hit |