User Tools

Site Tools


en:examples:objects:non_rotating_children

Non-rotating Child Objects

For attaching children whose position follows the parent's rotation, but the child's direction vector does not change.

Assets

Code

orxObject_CreateFromConfig("BossObject");

Config

[BossObject]
Graphic = BossGraphic
Position = (400, 300, -0.1)
ChildList = Gun1 # Gun2 # Gun3 # Gun4
Smoothing = true
AngularVelocity = 36
 
[BossGraphic]
Texture = boss.png
Pivot = center
 
[Gun1@GunObject]
Position = (-55, -55, -0.1)
Rotation = -45
 
[Gun2@GunObject]
Position = (55, -55, -0.1)
Rotation = 45
 
[Gun3@GunObject]
Position = (-55, 55, -0.1)
Rotation = -135
 
[Gun4@GunObject]
Position = (55, 55, -0.1)
Rotation = 135
 
[GunObject]
Graphic = GunGraphic
Smoothing = true
IgnoreFromParent = rotation ; For attaching children whose position follows the parent's rotation, but the child's direction vector does not change.
 
[GunGraphic]
Texture = gun.png
Pivot = (18.5, 26, 0)

Result

en/examples/objects/non_rotating_children.txt · Last modified: 2018/02/14 04:47 (3 months ago) by iarwain