Going crazy over here...

BlitzMax Forums/BlitzMax Programming/Going crazy over here...

SLotman(Posted 2010) [#1]
I'm trying to reproduce B3D 'entity' system (with parent-child assignments) in 2D for BlitzMax - but something is wrong, and I can't wrap my head around it to find the solution!

This is what I have:


So when I turn one object, it's child should turn also, and it's position should be also updated, to keep the original distance from it's parent.

This B3D code shows how it should behave:


Does anyone know how to correct calculate the child position? I'm completely lost here...


Jesse(Posted 2010) [#2]
can you post running b3d code. I don't own it so I can't tell what you are doing different. I know there are a couple of issues with your code which I believe I resolved but I could be wrong:



SLotman(Posted 2010) [#3]
Yes, that did it! Thank you so much!!!!

I just didn't change SetParent function - I want "SetParent null" to remove the entity parent ;)

Once again, thank you!


Jesse(Posted 2010) [#4]
you are welcome.


I just didn't change SetParent function - I want "SetParent null" to remove the entity parent ;)


I didn't quite understand that part when I first looked at the code so I just changed it to something that made sense to me but now I get it.

I like the code. I am going to integrate it in my code and use it for examples and demos if its OK with you.


SLotman(Posted 2010) [#5]
Sure, go ahead :)