Parent Pivots

Blitz3D Forums/Blitz3D Programming/Parent Pivots

Buggy(Posted 2007) [#1]
Is there a way to parent pivots to an object? Whenever I do it, they are listed as parented, but do not move with the object that they are parented to.


GfK(Posted 2007) [#2]
Your code is probably buggy. Do you see??

Anyway...

Sounds to me like you're checking that its moving (or not) with EntityX/Y/Z. By default these return the pivot's position relative to its parent object.

If memory serves, use EntityX/Y/Z,True to return the global position rather than the local one.


Buggy(Posted 2007) [#3]
No. I was checking that they are parented via CountChildren, and it is listed as parented correctly.

The purpose of these pivots is to be a spawn point for particles on the entity (like the mouth of a moving dragon, or the exhaust pipe of a moving car). After parenting, when I create particles at the spawn points, they are instead created at 0, 0, 0.

Now that I think about it, I *might* have created the particles at 0, 0, 0, but not moved them to the spawn points via PositionEntity. I'll check that.


Shambler(Posted 2007) [#4]
Sounds like you are moving the child object and not the parent.

Parents do not move with their children but children move with their parents...its a one way thing.

You need to make the object the parent and the pivots children of that object.


Buggy(Posted 2007) [#5]
That's what I did... sorry for my poor wording.


Buggy(Posted 2007) [#6]
Okay, I figured it out. It turns out that Gfk was right, but I didn't read his post all the way, so I had to figure it out myself.

Thanks, Gfk.