Welcome! Log In Create A New Profile

Advanced

change looking derection using wii motes ir in GRRlib?

Posted by filfat 
change looking derection using wii motes ir in GRRlib?
December 01, 2012 08:41PM
is there somewan thats can help me.. i want too look around using wiimote and point it at the screen. and so i will look to left when i hold the wimote to left. anyway to do this?
Re: change looking derection using wii motes ir in GRRlib?
December 02, 2012 10:46AM
This has been dealt with in the following thread.

As you can see from the video in this thread, there's an example of how to do in Wire3D's 'game' sample, if you want to have a look at the source code to see how it's done exactly. (you need to check out the SVN repository, that sample is not part of Wire3D 1.0.2)
Re: change looking derection using wii motes ir in GRRlib?
December 02, 2012 11:34AM
thats wont help :( i dont use wore3D is there any easy way to do this in grrlib?¿?



Edited 1 time(s). Last edit at 12/02/2012 11:34AM by filfat.
Re: change looking derection using wii motes ir in GRRlib?
December 02, 2012 12:01PM
Sorry, I am not going to spoon feed you. :)

The basic concept is explained in that thread and the sample. It's up to you to put a little effort in extracting the information you need for your particular scenario.
Re: change looking derection using wii motes ir in GRRlib?
December 02, 2012 01:06PM
Re: change looking derection using wii motes ir in GRRlib?
December 03, 2012 02:28PM
Quote
antibyte
Sorry, I am not going to spoon feed you. :)

The basic concept is explained in that thread and the sample. It's up to you to put a little effort in extracting the information you need for your particular scenario.

Sorry I dont get it... can you "spoon feed" me?
Re: change looking derection using wii motes ir in GRRlib?
December 03, 2012 04:35PM
Hope that helps. I tried doing a game like this but I could never get good draw distances so I gave up.

Basic hack is use the function like this;
float camera_x=20.0f, camera_y=4020.0f, camera_z=-1650;  //the position of camera
float camera_look_x=0, camera_look_y=0, camera_look_z=-1650;  //the direction the camera is looking

GRRLIB_Camera3dSettings( camera_x, camera_y, camera_z,  0,1,0,	camera_look_x, camera_look_y, camera_look_z );

Then you use the wiimote pointer to change the change "look" variables.

The correct way to do it is using this tutorial; [wii.scenebeta.com] by wilco2009 (it is in spanish so use a translater to read it. And it has downloadable code that works well.)
Re: change looking derection using wii motes ir in GRRlib?
December 03, 2012 05:53PM
thats was hard to undarstand... google translate is realy bad XD
Re: change looking derection using wii motes ir in GRRlib?
December 03, 2012 08:20PM
when i try shows the screen nothing and the translate is realt hard could you help me in the code? i can add you on sourceforge.
Re: change looking derection using wii motes ir in GRRlib?
December 04, 2012 03:08AM
use the code that I posted. when you press a button add/subtract from the camera_look_x variable.
Re: change looking derection using wii motes ir in GRRlib?
December 04, 2012 10:47AM
Quote
owen
I tried doing a game like this but I could never get good draw distances so I gave up.

That's partly because GRRLib is not really suitable for high performance rendering.
It does not support GX DisplayLists, meaning all rendering is done in immediate mode, which seriously wastes CPU time.
What's worse is the fact, that it also does not support VBOs (all rendering is done using GX_DIRECT with GX_SetVtxDesc, instead of using GX_INDEX8/16 and GX_SetArray), meaning the Wii hardware cannot utilize its vertex cache (works only with indexed geometries).
It also lacks LOD management for Objects, so you have to do that yourself.
Re: change looking derection using wii motes ir in GRRlib?
December 04, 2012 03:20PM
@antibyte Its not really GRRLIB. It was mostly the data crunching that was the problem.
Re: change looking derection using wii motes ir in GRRlib?
December 04, 2012 03:47PM
Yep, I'm not blaming GRRlib itself. I'm just pointing out that one would have to implement aforementioned features oneself in order to get decent perfomance (which is a prerequisite for rendering larger scenes).

Anyways, sorry for going off-topic. :)
Sorry, only registered users may post in this forum.

Click here to login