Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / My player is freaking out (Jumping around)

Author
Message
CocaCola
9
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 3rd Sep 2010 01:57 Edited at: 3rd Sep 2010 01:58
No media required for testing as long as you have physics.
Test this out and you will see that the sphere is very very shaky and I can't figure out why.
I have it pretty well labeled and stuff you could probably help without testing.



Vista
DBpro 7.4/7.5
Dark game studio bonanza

EDIT: I just tried removing phy set gravity and it didn't really help.

I want coke, not Pepsi!
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 3rd Sep 2010 18:01
There are two ways you could do this. One is to add



near the start of your code or you could place the # sign after the x, y and z variables. DBP is interpreting x, y and z as integers because you have not told it otherwise. Since object positions are floats, you get the jagged movement.

So many games to code.......so little time.
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Sep 2010 19:32
CocaCola is there a reason why you add another camera when you right your code?

Dark Physics makes any hot drink go cold.
CocaCola
9
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Sep 2010 02:26 Edited at: 4th Sep 2010 02:29
Thanks this works


And HowDo I prefer making a camera 1 instead of using camera 0, and besides I have dark lights (or something like that in the DGS bonanza) so can't I make as many cameras as I want?

I want coke, not Pepsi!
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 4th Sep 2010 02:59
I gave you two ways to fix the problem, and you have tried to impliment both in the same code. The reason it works is because you used the # sign after your x, y and z variables, in effect telling DBP they are floats. Since you did that, you do not need to declare x,y and z as floats.

If you decide to declare them as floats, then you would not need the # sign after the x, y and z variables.

So, do it either way, but you don't need them both. Are you with me?

So many games to code.......so little time.
CocaCola
9
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Sep 2010 07:54
Quote: "Are you with me?"

yeah, thanks, so if I declare something as a float I don't need "#"?

I want coke, not Pepsi!
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 4th Sep 2010 16:59
Yes.

So many games to code.......so little time.

Login to post a reply

Server time is: 2019-06-19 23:48:36
Your offset time is: 2019-06-19 23:48:36