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 / newxvalue, newzvalue problems!

Author
Message
Patrick
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 15th Oct 2002 23:32
When I use newxvalye and newZvalye to move the camera, it only moves in 8 directions (0,45,90,135... degrees). Doesn't matter what direction the camera is facing, either, it just picks whichever 45 degree increment is closest and moves along it. Strafing works just fine with the newXvalue and newZvalue commands, so I don't know what I'm doing wrong!
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Oct 2002 00:30
I had problems with that but it was entirely due to limiting speed values. Can you post some code?
Patrick
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 16th Oct 2002 03:53
Well, I raised the step values of the functions and now the function correctly, I previously had them at 2, and before that, 1. So as far as I'm concerned, it works fine, but what is the best way to limit speed? Multiply the newx/newz values by .2, or so?

Zero
22
Years of Service
User Offline
Joined: 28th Aug 2002
Location: Finland
Posted: 16th Oct 2002 16:21
Use sin and cos instead.

x#=x#+sin(angle#)*step_value#
z#=z#+cos(angle#)*step_value#

The evil plan is now even closer!
- - - - - - - - - - - - - - - - - - - -
Specs:- P3 550 Nvidia TNT2M64, 192Mb RAM
Patrick
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 17th Oct 2002 05:49
even with that I have the same problems, as that is how I was moving around after newx, newz were causing trouble

Login to post a reply

Server time is: 2025-05-12 12:14:21
Your offset time is: 2025-05-12 12:14:21