User Tools

Site Tools


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.

This content only works with the latest development version of Orx available on github. It will not work with the current version 1.8.

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

examples/objects/non_rotating_children.txt · Last modified: 2017/06/09 04:57 (6 weeks ago) by iarwain