How Parent/Children works?

About Monkey 2 Forums Monkey 2 Programming Help How Parent/Children works?

This topic contains 6 replies, has 2 voices, and was last updated by  swipis 1 year, 2 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #13181

    swipis
    Participant

    Hello,

    I am new to Monkey2 and want to know how can I set object to be a parent and another object to be a child (both objects are Models). And does Parent rotation will apply to its child (if I rotate parent)?

    Thank you.

    #13183

    Mark Sibly
    Keymaster

    Use the ‘Parent’ property to change an entity’s parent, eg:

    You can also set an entity’s parent to ‘null’, meaning the entity is in ‘world space’.

    #13184

    swipis
    Participant

    Thank you Mark! And how about Parent rotation will it apply to its children automatically?

    #13185

    Mark Sibly
    Keymaster

    Yes, it’s very much like blitz3d (if you’ve ever used that)!

    A child entity’s position, rotation and scale are all relative to the parent entity. So moving, rotating, scaling the parent will also move, rotate, scale the child.

    #13186

    swipis
    Participant

    Thank you again, I trying to rotate parent but parent and child not rotating 😀 did something wrong. And about blitz no I did not use, I heard about Monkey2 2 days ago and I like so far!

     

    Thank you again!

    #13187

    Mark Sibly
    Keymaster

    Here’s a little demo…

    #13188

    swipis
    Participant

    Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.