If the camera is a parent of the character node it's position wouldn't affect the camera position. So the gravity wouldn't do anything to it, because children don't affect parents.
You could try making camera a child of your character, though that may not give you the effect you wan't.
Frame rate independent movement doesn't work?
Re: Frame rate independent movement doesn't work?
Working on game: Marrbles (Currently stopped).
Re: Frame rate independent movement doesn't work?
Yes, and then I should edit the event handler because of rotation and movement etc because the fpscam won't react at the mouse.
But I still don't get it. If the camera isn't effected by the gravity. Why is there a max jump height then (eventhought it's not the same on every pc). In my point of view it would only get higher and higer then :/
But I still don't get it. If the camera isn't effected by the gravity. Why is there a max jump height then (eventhought it's not the same on every pc). In my point of view it would only get higher and higer then :/
Re: Frame rate independent movement doesn't work?
Well, yeah. I can't really find a reason right now why it has a max height.
But anyways, how you want to make the player jump looks not right to me.
What you should do is make the physics body jump and make the camera follow it, not the other way around.
But anyways, how you want to make the player jump looks not right to me.
What you should do is make the physics body jump and make the camera follow it, not the other way around.
Working on game: Marrbles (Currently stopped).
Re: Frame rate independent movement doesn't work?
Yes, I know cause then it will be effected by the gravity. But the character model isn't done yet ( someone is modelling it for me). And till that time I wanted to use just a camera. But the SKeyMap gave me that problem with different max jump heights.. So i tried it with the solution I found somewhere on this forum (the code in my first post of this topic). But it has the same effect, no difference rly. :/
But now I should make the character react at the movement of my mouse (rotation)
and then something like bindTargetAndRotation for the camera?
But anway, I was just wanting to make this code work till the character was done xD.
Diho
But now I should make the character react at the movement of my mouse (rotation)
and then something like bindTargetAndRotation for the camera?
But anway, I was just wanting to make this code work till the character was done xD.
Diho
Re: Frame rate independent movement doesn't work?
For frame rate independent movement, you are doing it right. That is, getting the time since the last frame and multiplying it by the amount to move.
So the problem is probably with your physics I suppose.
Also, if you are waiting for a character to be modelled, you could just use something as a place holder in the mean time, like a cube or whatever.
So the problem is probably with your physics I suppose.
Also, if you are waiting for a character to be modelled, you could just use something as a place holder in the mean time, like a cube or whatever.
Re: Frame rate independent movement doesn't work?
Indeed, I know. But it's still weird it can't be done with just a camera.
But like you said I will try it with just a basic cube.
Diho
But like you said I will try it with just a basic cube.
Diho