SetElementAngularVelocity: Difference between revisions
Jump to navigation
Jump to search
Einheit-101 (talk | contribs) mNo edit summary |
m (fix revision 14165) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{New feature/item|3.0156|1.5.5| | {{New feature/item|3.0156|1.5.5|14165|Sets the angular velocity of a specified, supported element (Applies a spin to it).}} | ||
==Syntax== | ==Syntax== | ||
Line 9: | Line 9: | ||
{{OOP||[[element]]:setAngularVelocity|angularVelocity|getElementAngularVelocity}} | {{OOP||[[element]]:setAngularVelocity|angularVelocity|getElementAngularVelocity}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theElement:''' The [[element]] to apply the spin to. Can be either a [[player]], [[ped]], [[object]], [[vehicle]] or a [[Element/Weapon|custom weapon]]. | *'''theElement:''' The [[element]] to apply the spin to. Can be either a [[player]], [[ped]], [[object]], [[vehicle]] or a [[Element/Weapon|custom weapon]]. | ||
*'''rx:''' velocity around the X axis | *'''rx:''' velocity around the X axis | ||
*'''ry:''' velocity around the Y axis | *'''ry:''' velocity around the Y axis |
Revision as of 14:15, 28 August 2018
Sets the angular velocity of a specified, supported element (Applies a spin to it).
Syntax
bool setElementAngularVelocity ( element theElement, float rx, float ry, float rz )
OOP Syntax Help! I don't understand this!
- Method: element:setAngularVelocity(...)
- Variable: .angularVelocity
- Counterpart: getElementAngularVelocity
Required Arguments
- theElement: The element to apply the spin to. Can be either a player, ped, object, vehicle or a custom weapon.
- rx: velocity around the X axis
- ry: velocity around the Y axis
- rz: velocity around the Z axis
Returns
Returns true if it was succesful, false otherwise.
Example
function onColShapeHit ( thePlayer, matchingDimension ) -- When a player hits the collision shape, give him a spin setElementAngularVelocity ( thePlayer, 0, 0, 20 ) end addEventHandler ( "onColShapeHit", root, onColShapeHit )
See Also
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement