It looks like you're new here. If you want to get involved, click one of these buttons!
I'm looking to make a foreground object for the players arms, I'm trying to position the Z axis ahead of the parent object so I've done this:
[PlayerObjectFront@PlayerObject]
AnimationSet = PlayerAnimationSetFront
Position.z = > Object.GetPosition ^, > + < (0,0,0.1), Object.SetPosition <
IgnoreFromParent = position.position.z
Any suggestions on how to get this config to work?
Comments
If this object has an actual parent (in the object hierarchy way, either through
ChildList
orSetParent
), its position is expressed in the parent's frame of reference, including Z, in which case a constant negative Z value will always have it displayed in front of its parent.But given your question, I take it it's not actually a child object at all, is that correct?
Nope it is in the child list, I'm not sure why its appearing behind. I also saw some interesting behavior where if I leave out the Position on the PlayerObjectFront it appears in a different location, however even setting "Position =" fixes it and places it in line with the paret, with a blank value.
Here's a simple test I based on your config that yielded the expected result when used inside the bounce playground:
The Important component here being the
-0.01
Z value for the child's position.Now, on a related unrelated topic, regarding your former configuration:
There are a few things here that can't work:
Position.z
isn't an object key,Position
is%
Let's say you want to modify the object at runtime, here's how you could do it:
However in this particular case, that would yield the same result as setting the constant position in the first place.
You can check an object's hierarchy (including local/world position, rotation and scale) by running the following commands:
In this case, I got:
EDIT: Adding a text version as apparently we can't see the full scale image in the forum:
Awesome that does fix things, I appreciate the help. Thats also a great tip for finding out the information from the console.
I do notice its not following the same animation, which I thought children did. Would there happen to be an easy method of linking animations together?
I did see this one:
However I dont think it would work since I'm setting animations based on keypress.
My pleasure!
Yes, one way to do it is the one described in this video: use the recursive versions of
SetCurrentAnim
/SetTargetAnim
.I'm not sure I understand the constraint of the keypress though and how that prevents you from using this approach. Would you mind giving more details?
Unfortunately I had a hard time understanding the video because hes silent during the parts I'm trying to figure out so it flew over my head.
I realized foolishly that there was a function orxObject_SetTargetAnimRecursive which did work, thanks again!
Ah I see. Don't hesitate to give us feedbacks on those video, this will help us improve over time.
The 3rd one should already be a bit better as I'm not typing the content live anymore: I wrote a tool that automates this part entirely, which in turns makes the entire video flows better.