CartoonFactor (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Emess
No edit summary
Fix broken example and code formatting
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{CatUp|Properties}}
<onlyinclude>{{Property
 
|name = CartoonFactor
{|
|<onlyinclude>{{Property|
name = CartoonFactor
|property = [[Number]] ''tendency to face target''
|property = [[Number]] ''tendency to face target''
|description = Sets the tendency for the brick with the RocketPropulsion to face its target.
|description = Sets the tendency for the brick with the RocketPropulsion to face its target.
|object = RocketPropulsion
|object = RocketPropulsion
|}}</onlyinclude>
}}</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).
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]]
[[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