# Confuse with Hpr

Ok… I feel very stupid to post this but it’s making me crazy…

I always though that the heading, in setH or getH was in degree… But with a strange bug in my game, I discover that it certainly not on 360 degree…

I have a dummy node use to rotate a satellite around a planet. I was printing his Hpr to correct another bug that is not related. But my surprise was that:

1- When I to this:

``self.dummyNode.setH(self.dummyNode.getH() - (elapsed * speed))``

It will never comme back to 0. It goes down like -100, -600, -100000, etc…

2- It take approximatly 1200 (I approximate) to make a complete turn around the planet…

Can someone explain me what is going on???

Thanks

If you have more question, I can give code

Jaff

the perfect book for all this basic physic stuff -> mel fundamentals for maya

Sorry but I don’t understand.

Why did you post this code? I see it’s something rotating around a planet but my question was about Hpr… I’m pretty advance in my game and I tough I knew how Hpr were working but right now I’m confuse… Maybe some explication with your code?

thanks!

Jaff

sorry, it was a just experiment to figure out whats your problem is…

greetz
dirk

Is t a paper and ink book? Is it availible online? Is it free? How much does it cost if it is not free?

Well, the code you post guy is cool but it does not help me …

I guess I will figure it out myself

Thanks

Jaff

Ditus: Last warning.

Stop spamming - otherwise you will get banned.

Your Code has had nothing to do with the given problem. (removed the useless posts)

Regards, Bigfoot29

sorry, i thought this code could also be such nice in this tread. im going to post it into code snippsel. it just such a nice animated graphic whcih shows you how to rotate something around a other object.

sorry that i cant figure darkjaffÂ´s problem.

best wishes

#1 problem goes from the modeling
check where the pivot point is

#2 Check your something like getMat().getRow(1)
the diferent values of getRow goes into diferrent result.
( dont know if this concern or not I just remember the *elapsed function in ralph sample )

no, its all degrees, not radians.

The fact that you have set the H to, say, 20000 doesn’t matter - panda automatically wraps around. If you do getH and it still returns 20000, thats OK. Panda automatically does the wrapping around at 0 and 360.

Someone correct me if I’m wrong or if I understood the problem wrong.

Thanks to everyone

I realised this during the weekend. Thanks for your good explanation

Have a great day.

Jaff