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 / Camera not responding?

Author
Message
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 2nd Jul 2010 15:28
Hi

i cant seem to get the camera to move using this code


have tried without the "make camera" and using the camera nr, but dosnt seem to work either.

Keep it simple.
Questions? Mail me
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2010 15:48


Well, you are positioning the camera at 0,y,0, but the variable isn't "y", it's "y#". So try :


TheComet

Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 2nd Jul 2010 16:22
nope, have tried that already :3 copypasted the code, then i fixed the error, then i posted..

Keep it simple.
Questions? Mail me
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Jul 2010 17:09
Works for me when I do what TheComet said but I had to add:


...at the beginning and delete all your memblock stuff.

It helps if you can provide a version that doen't work but at least runs standalone in some way, and if you say exactly what the problem is like "When I press the upkey the camera doesn't go up!"

Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 2nd Jul 2010 19:23
Quote: ""When I press the upkey the camera doesn't go up!""


thats the problems; it dosnt move up - my code seems pretty obvious, atleast to me

and how the heck can i just "delete" the memblock stuff? thats kinda what am prototyping

Keep it simple.
Questions? Mail me
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jul 2010 19:43
What makes you think the camera isn't moving?

The camera position IS changing as you can easily see if you add the following line to your main loop:



It would help if you had something for the camera to look at so we could see the camera moving or not moving as the case may be.

The camera angle doesn't change because you haven't changed it ...
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 2nd Jul 2010 21:28 Edited at: 2nd Jul 2010 21:29
gah-h, tired and in need of sleep i had put "angle" insted of "position"

edit: well, ye, im trying to make a "donut", but it dosnt seem to work >_<

Keep it simple.
Questions? Mail me
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Jul 2010 23:11
Maybe it would help if you described your problem better...

Quote: "i cant seem to get the camera to move using this code"


Quote: "how the heck can i just "delete" the memblock stuff? thats kinda what am prototyping"


Quote: "well, ye, im trying to make a "donut", but it dosnt seem to work >_<"


Is the problem related to the memblock stuff or the camera position?

Please don't have a go at me when I'm trying to help...

Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 3rd Jul 2010 16:19
donut -> http://www.businesspundit.com/wp-content/uploads/2009/06/zzdonut.jpg

trying to make a model-like that with memblock meshes.. the camera moves, i was just a bit tired and swapped position with angle

Keep it simple.
Questions? Mail me
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 3rd Jul 2010 22:27
something like a circle, with a circular-hole inside.

gah-h, hard to explain

Keep it simple.
Questions? Mail me
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Jul 2010 00:35 Edited at: 4th Jul 2010 00:36
Don't worry, we all know what a doughnut looks like:

Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 4th Jul 2010 01:37
ye, but to be a bit more serious, anyone know why I cant see the model? Don't I need a index-list in there too?

Keep it simple.
Questions? Mail me
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Jul 2010 02:33
Quote: "anyone know why I cant see the model? "


By making a few changes to your code I managed to see something - but it still wasn't right. No time now to investigate in detail, but one thing you might check is the default FVF format you've assumed. I believe it is 274 not 338 as stated in the Help file, i.e. it is now XYZ, NORMALS, TEX1.

Another thing is your camera positioning. It's a good idea to control the camera explicitly by using

autocam off
position camera
point camera

before the main loop.

Also, is your camera even looking at the object - your a and b values seem to place the object in a strange place?

Are you sure your polygons are constructed correctly - i.e. 3 vertices per polygon (I haven't checked your code)?
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 4th Jul 2010 18:56
ye, the a and b has been changed to 0.
What exactly did u do to even see anything at all?

Keep it simple.
Questions? Mail me
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jul 2010 00:19
Quote: "What exactly did u do to even see anything at all?"


Not sure since I didn't keep the code.

But this version should give you some clues

Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 10th Jul 2010 01:03
thanks, great commin' back from a short vacation and someone else has soloved most of ur problem

Keep it simple.
Questions? Mail me

Login to post a reply

Server time is: 2026-07-25 08:11:00
Your offset time is: 2026-07-25 08:11:00