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 / Position object to mouse

Author
Message
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 24th Apr 2013 17:19
Hi guys i've got this code to move an object at mouse position when you double click somwhere, the prototype works fine but when i move it to my project something goes wrong i don't know what exactly.Istead of placing the object at mouse position to a given distance it place it to camera position.For get pick vector to be accurate i read that camera position must be appended.Also sometimes in the prototype code when you move the mouse near the placed object it ovverides camera condition and move the camera slightly.Here is the code:



Coding is My Kung Fu!
And My Kung Fu is better than Yours!
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 25th Apr 2013 14:35
Nevermind i found out what is the problem.It was camera range that caused this.I use really extreme values for that and if it is beyond 1mil or so it don't recognize pick screen command for some unknown reason, solution is to reset it to smaller value just before using pick screen and then make it back to what it was after that.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Login to post a reply

Server time is: 2026-07-06 18:36:21
Your offset time is: 2026-07-06 18:36:21