Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- addDifferential
- addForce
- addImpulse
- addToPhysics
- addTorque
- addTorqueImpulse
- addVehicleLink
- computeWheelShapeTireForces
- createCCT
- createWheelShape
- getAngularDamping
- getAngularVelocity
- getCCTCollisionFlags
- getCenterOfMass
- getCollisionMask
- getDensity
- getHasTrigger
- getLinearDamping
- getLinearVelocity
- getMass
- getMotorRotationSpeed
- getRigidBodyType
- getVelocityAtLocalPos
- getVelocityAtWorldPos
- getVolume
- getWheelShapeAxleSpeed
- getWheelShapeContactForce
- getWheelShapeContactNormal
- getWheelShapeContactObject
- getWheelShapeContactPoint
- getWheelShapePosition
- getWheelShapeSlip
- JointConstructor:setActors
- JointConstructor:setJointTransforms
- moveCCT
- overlapBox
- overlapConvex
- overlapSphere
- raycastAll
- raycastClosest
- removeAllDifferentials
- removeCCT
- removeFromPhysics
- setAngularDamping
- setAngularVelocity
- setCenterOfMass
- setCollisionMask
- setFrictionVelocity
- setJointDrive
- setLinearDamping
- setLinearVelocity
- setMass
- setRigidBodyType
- setSolverIterationCount
- setWheelShapeForcePoint
- setWheelShapeProps
- setWheelShapeTireFriction
- simulatePhysics
- simulatePhysicsTimeScale
- updateDifferential
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
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, boolean async)Arguments
float | x | x |
float | y | y |
float | z | z |
float | nx | nx |
float | ny | ny |
float | nz | nz |
string | raycastFunctionCallback | raycastFunctionCallback boolean continueReporting (actorId, x,y,z, distance, nx,ny,nz, subShapeIndex, shapeId, isLast) |
float | maxDistance | maxDistance |
object | targetObject | targetObject (optional) |
integer | collisionMask | collisionMask [optional, default=ALL_BITS] |
boolean | generateNormal | generateNormal [optional, default=false] |
boolean | async | if true, callback will be called in the next frame and calculations will be done in a background thread. In Async mode, the return value has no meaning and if no hit is found, the callback is called once with 0 ids. [optional, default=false] |
integer | numShapes | numShapes if async is false |