Page 3 of 8

Posted: Wed Jan 21, 2004 11:13 am
by Homer
hm, strange. i've also tried to compile boogles sample and got the same error.

Posted: Sat Mar 20, 2004 7:03 am
by LagAlot
ok this werks kewl however when i add the stencil shadows i notice i hover off the floor..I put the faerie in there and it did not hover..so i'm assuming i need to send some kinda ofset to my bounding box (for collision) because it would apear that that is what determins your Z..(in relation to the floor) Am i headed down the right road?

Posted: Sat Mar 20, 2004 5:55 pm
by LagAlot
my bad i rescaled my model in milkshape and everything is in the right place now.. :)

Posted: Mon Mar 22, 2004 3:21 pm
by Homer
Today I've tried to get this 3rd person camera to work again, but I had no luck. I always get these linker errors powerpop mentioned, even with boogles sample file. Maybe this has to do with the VC-project file I've created for the sample. Can someone please explain me the important project-settings, because I'm a C++-newbie and don't know what directly causes this error? Many thanks in advance

Edit: OK, it works now. I've just changed "_WinMain(...)" to "main()"

Posted: Sat Apr 24, 2004 3:47 pm
by Hjortur239
Ive tried to compile the source code to the camera, but i get these compile errors in DevCpp:

In file included from CSceneNodeAnimator3PPlayer.h:4,
from 3rdPersonCamera.cpp:10:
CSceneNodeAnimator3PCamera.h:9: redefinition of `class
CSceneNodeAnimator3PCamera'
CSceneNodeAnimator3PCamera.h:9: previous definition of `class
CSceneNodeAnimator3PCamera'

CSceneNodeAnimator3PCamera.h:9: confused by earlier errors, bailing out

make.exe: *** [3rdPersonCamera.o] Error 1

any ideas what

Posted: Sun Apr 25, 2004 12:43 am
by luvcraft
I think it's because the code was written with Irrlicht 0.4.2, and we're now on 0.5, so the code is no longer compatible. Hopefully someone will rewrite it to work with the current version! :)

Posted: Sun Apr 25, 2004 12:59 am
by luvcraft
Nevermind. I just tried creating a new win32 console app, adding in ALL the .cpp and .h files in the directory, and replaced the convoluted main with a simple "int main()" and now it works wonderfully. :)

I found this, by the way, while trying to get my controls to work better; I think I like the 3p camera I made better (although it's not a pretty scene node animator), and once I fix the controls and a few other things I'll post it.

My take on the 3rd person camera

Posted: Mon Apr 26, 2004 3:19 am
by luvcraft
Here's my attempt at a 3rd Person following camera a'la Wind Waker, Jak II, etc. As usual, you'll need to copy Sydney and the map into the same directory.

http://www.unm.edu/~luvcraft/main.cpp

Move the player with arrow keys, rotate camera with A and S.

I wanted to make the player move more like Wind Waker or Jak II (i.e. like Boogle's demo, but with the character rotating to the right direction first, then moving), and I thought I could just base it off the rotation of the camera, except that setTarget() doesn't actually change the camera's rotation at all! Argh! So, what would be the easiest way to get a Y-axis rotation value based on the camera's target?

---Added 4/26

Alrighty, I've implemented some semi-Wind-Waker-like controls. I'm not really happy with them, but I'm done for tonight. Hopefully someone can give my some input on them to make them less absolutely horrible. Same URL as the previous post.

If you want to try out the old controls, which were less freaky but also less like what I'm aiming for, just change the resolve_controls_WW() to resolve_controls_RE() and recompile.

Woohoo! Fourth post in a row by me! I just love talkin' to myself... yay...

:(

Also, is it just me, or are Y and Z swapped in getRotationDegrees() ?

Posted: Tue Apr 27, 2004 12:25 pm
by etcaptor
Hi luvcraft,
Your code works well for me, thanks!

Posted: Tue Apr 27, 2004 9:25 pm
by Hjortur239
well, luvcraft, thought i'll download your code to see if it works and it seemed to start to compile right, but then i get a error:

main.o(.text+0x89a):main.cpp: undefined reference to `_imp___ZN3irr12createDeviceENS_5video11EDriverTypeERKNS_4core11dimension2dIiEEjbbPNS_14IEventReceiverEPKw'

any ideas?

Posted: Tue Apr 27, 2004 9:45 pm
by luvcraft
Hjortur239 wrote:well, luvcraft, thought i'll download your code to see if it works and it seemed to start to compile right, but then i get a error:

main.o(.text+0x89a):main.cpp: undefined reference to `_imp___ZN3irr12createDeviceENS_5video11EDriverTypeERKNS_4core11dimension2dIiEEjbbPNS_14IEventReceiverEPKw'

any ideas?
What compiler are you using? Do the irrlicht examples compile OK?

Posted: Tue Apr 27, 2004 9:47 pm
by Hjortur239
im using DevCPP

yes, all examples compile fine, im also having linker errors with the Newton tut too.

edit: well all but example 9, and it gets the same error.

Posted: Wed Apr 28, 2004 2:40 am
by luvcraft
Hmmm... what if you comment out the "setwindowscaption" function?

Posted: Wed Apr 28, 2004 11:24 am
by AssiDragon
On a sidenote, I broke the camera into camera.cpp, main.cpp and main.h files so it's relatively easy to put it into other stuffs if someone needs it - camera is now being handled by two functions, depending what you want.

The two are
void FixedCameraUpdate(p1_movedir, p1, camera, moving, cam_rotate);
void RubberCameraUpdate(p1_movedir, p1, camera, moving, cam_rotate);

The fixed camera stays behind the viewed node from a fixed angle and distance (if anybody played Drakan- Order of the Flame knows what this is like for sure) and shows the front of the node being viewed if cam_rotate has a value. RubberCameraUpdate is your function, actually. :) I found this way it nice, coz you can define more camera styles, and change the object being followed simply by changing a variable.

Just wondered if you could get Newton working with this camera code. I keep getting crashes and tons of errorrs with newton being implemented - starts to annoy me... lol

Posted: Wed Apr 28, 2004 2:24 pm
by Homer
AssiDragon wrote:On a sidenote, I broke the camera into camera.cpp, main.cpp and main.h files so it's relatively easy to put it into other stuffs if someone needs it - camera is now being handled by two functions, depending what you want.
Great! Can you please upload these files? I have some problems with my 3rd person camera, so I would be very happy if I could try your code.