CartoonFactor (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Anaminus
content
Fix broken example and code formatting
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Property|
<onlyinclude>{{Property
name                 = CartoonFactor
|name = CartoonFactor
|property             = [[float]] ''CartoonFactor''
|property = [[Number]] ''tendency to face target''
|description         = The tilt of the rocket as it flies. A value of 0 will make the rocket's nose point upwards. A value of 1 will make the rocket's nose point straight towards the [[Target (Property)|Target]]. <b>CartoonFactor</b> must lie between 0 and 1.
|description = Sets the tendency for the brick with the RocketPropulsion to face its target.
|object              = [[RBX.lua.RocketPropulsion (Object)|RocketPropulsion]]
|object = RocketPropulsion
|}}
}}</onlyinclude>
 
{{clear floats}}
 
==Description==
The Rocket Propulsion object uses this value to determine how cartoonish a rocket should act. In real life, rockets tend to aim just a little bit up from their target to counter the effects of gravity. 0 will point straight up in the air, where 1 will point straight at a target. The default is 0.7 (points a bit up from the target).
 
{{Example|Here's a [[Script]] that would keep the [[RocketPropulsion]] facing its target.<syntaxhighlight lang="lua">
local RoPr = Instance.new('RocketPropulsion', game.Workspace)
 
while wait() do
  RoPr.CartoonFactor = 1
end</syntaxhighlight>}}
 
[[Category:Properties]]

Latest revision as of 03:22, 18 April 2023

CartoonFactor
Property Number tendency to face target
Description Sets the tendency for the brick with the RocketPropulsion to face its target.
Member of RocketPropulsion


Description

The Rocket Propulsion object uses this value to determine how cartoonish a rocket should act. In real life, rockets tend to aim just a little bit up from their target to counter the effects of gravity. 0 will point straight up in the air, where 1 will point straight at a target. The default is 0.7 (points a bit up from the target).

Example
Here's a Script that would keep the RocketPropulsion facing its target.
local RoPr = Instance.new('RocketPropulsion', game.Workspace)

while wait() do
   RoPr.CartoonFactor = 1
end