CartoonFactor (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Flurite
No edit summary
Fix broken example and code formatting
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
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).
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.<code lua>
{{Example|Here's a [[Script]] that would keep the [[RocketPropulsion]] facing its target.<syntaxhighlight lang="lua">
local RoPr = Instance.new('RocketPropulsion', game.Workspace)
local RoPr = Instance.new('RocketPropulsion', game.Workspace)


while wait() do
while wait() do
   RoPr.CartoonFactor = 1
   RoPr.CartoonFactor = 1
end</code>}}
end</syntaxhighlight>}}


[[Category:Properties]]
[[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