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.

DarkBASIC Professional Discussion / Rotate camera on the z axis : problem ...

Author
Message
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 26th Jul 2010 22:24
Hi, when I rotate the camera on the z axis, I can't rotate the camera on any axis and it doesn't rotate on the z axis ...

Someone would know why ?

Thanks

Eternal suffering ...

I'm french
Zyronagon
18
Years of Service
User Offline
Joined: 6th Mar 2008
Location: USA
Posted: 26th Jul 2010 23:05
That's pretty vague. Post your code and maybe someone can help.
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 26th Jul 2010 23:14
It's possible that you don't understand all, because I'm using Fpsc and ODE (Open Dynamics Engine).



Eternal suffering ...

I'm french
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Jul 2010 16:46
I would love to help you, but your code is a mess and I can't see what you are trying to accomplish with it. If you give me a simplified version that gives you the same problem, I'll look at it.

The fastest code is the code never written.
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 28th Jul 2010 02:13 Edited at: 28th Jul 2010 02:14
Ok, the more important :



And I can't turn my camera ... Strange ...

Eternal suffering ...

I'm french
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 28th Jul 2010 10:50 Edited at: 28th Jul 2010 10:56
The mousemove commands report the mouses movement since they were last called so it is likely that you are using mousemovex() earlier in your code. If that is the case the value will be reset to zero, hence no movement.
What I would suggest is early in the code have line that assigns a variable to mousemovex()
and then replace all instances of mousemovex() with that variable.

[edit]I have just looked at the longer code you posted earlier and what I suggested is correct.



Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 29th Jul 2010 17:04
It doesn't change ...

Eternal suffering ...

I'm french
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 30th Jul 2010 07:11
@scraggle:
that's not the problem, because hes adding mousemovex to the actual camera z value

@hell_666:
what do you mean 'turn' the camera? arent you confusing z with y axis?



[some day ill learn english, i promise]
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 30th Jul 2010 15:42
Quote: "that's not the problem, because hes adding mousemovex to the actual camera z value"

That is the problem; if you use mousemovex(or y or z) more than once in a loop cycle the very first time the command is used it reports the correct value; the second/third/nth time its used in the same loop it will always return the value as 0 unless the nest itself is looping and syncing, again with a single call of mousemovex. This is why its better to assign a variable the first time the command is used and use the result kept by the variable whenever you want to call it, after its first used.
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 30th Jul 2010 21:59
@Sepnon : ... I'm not stupid, I know the axis ^^

@James H : Ok, it must be this, thanks

Eternal suffering ...

I'm french
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 30th Jul 2010 22:07
double ouch
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 3rd Aug 2010 10:08
lol

+z is usually forwards
+y is usually up
+x is usually right

just in case you didn't know

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 3rd Aug 2010 11:49
^ that's spatial

he means rotation

darkbasic has some funny rotation effects when you try to rotate an object along three axes and change the angle variables X,Y,Z on your own

most games ive seen seem to stick to X and Y, not being able to go up and loop upside down, because the mouse stops at Y angle +90
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 3rd Aug 2010 15:50
Yes, I've found the solution, a part of my code at the end ...

Thanks all

Eternal suffering ...

I'm french

Login to post a reply

Server time is: 2026-07-25 23:11:37
Your offset time is: 2026-07-25 23:11:37