Search found 32 matches
- Thu Dec 29, 2011 11:40 pm
- Forum: Questions and Help
- Topic: Character class in WP7
- Replies: 3
- Views: 3241
Re: Character class in WP7
A thanks a lot! I managed to port it to WP7 to handel multitouch. It is working great. Now I have one quick question still, is there for example an easy way to draw at the positions of some boxes in the space my own model? Eg I have a couple of boxes in space, these boxes are now randomly coloured. ...
- Wed Dec 28, 2011 10:26 pm
- Forum: Questions and Help
- Topic: Character class in WP7
- Replies: 3
- Views: 3241
Character class in WP7
Dear Norbo, I am looking for the Character Class for WP7 but I am not able to find it. Do you know where I can get this class? Is it not included in the WP7 version? I am using the Vehicle class now but it does not give me the desired results as I'm trying to make a character. Thank you in advance. ...
- Thu Sep 02, 2010 2:58 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
yeah this kind of worked however my alignment to surface was computed later. The problem was there where some off-axis tricks so the orientation was not just 360 degrees for perfect landing it could also be 270 + 270 which made it odd so I added a separate counter for ther off-axis stuff, which work...
- Tue Aug 31, 2010 11:41 am
- Forum: Questions and Help
- Topic: Triangle mesh and light
- Replies: 5
- Views: 5550
Re: Triangle mesh and light
I just draw my terrain seperately instead of drawing the triangle mesh (this also looks much smoother). I only add the model triangle mesh to the space and add the same model straight to my own drawer which is just the basic code from msdn, this works fine. if you need an example of how my code look...
- Mon Aug 30, 2010 7:01 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
Okey I'm working on the landing part now. It's kind of tricky. Say I got the ground normal, and I got the orientation matrix of the trick in the air. How am I able to compare those angles? Again the only angles that matter for the landing is the rotation around the internal x-axis. this should be ro...
- Sat Aug 28, 2010 8:27 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
ah yeah thats a good solution as well. I figured something different out in the mean while. The rotation speed is angular speed so I just summed all the rotations around the vertical axis. once this is like 180 + n*360 it will just round it to 180 degrees and add it to the standard orientation of be...
- Wed Aug 25, 2010 9:09 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
Well what my code right now does is it has 2 matrices for transformation and orientation. On startup both will be exactly the same, and while it's on the ground one matrix gets reorientated when steering, this matrix is then again copied to the other matrix. The second matrix gets reorientated seper...
- Wed Aug 25, 2010 12:28 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
thanks, I can work with that. if (SnowBoardingGame.onTheGround == true) { characterController.movementDirection = Vector2.Normalize(totalMovement); } Forgot that part of code. it is infact in use. when on the ground else it will just keep flying in the same direction, since steering in the air is no...
- Tue Aug 24, 2010 10:27 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
Vector2 totalMovement = Vector2.Zero; //Collect the movement impulses. Vector3 movementDir; acc += dt; float turnSpeed = 2.5f + 0.5f * 25 * acc * acc; // degrees per update // Cap turnspeed; if (SnowBoardingGame.onTheGround == false) { if (turnSpeed > 12.5f) turnSpeed = 12.5f; } else { if (turnSpee...
- Tue Aug 24, 2010 3:25 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
Thanks however the first code displays the graphics upside down :( when I do float tiltAngle = (float)Math.Acos(-SnowBoardingGame.orientationTransform.Y); //This is equivalent to arccos(normal dot upvector), since the up vector is (0,1,0) if (tiltAngle > 0.00001f) //Don't want to normalize something...
- Mon Aug 23, 2010 8:26 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
Oké i,m trying to clean up my code a bit. I got THE normal, i coverted this to angles by this code Vector3.Normalize(normalVector); xRotation = Math.Acos(normalVector.X); yRotation = Math.Acos(normalVector.Y); zRotation = Math.Acos(normalVector.Z); GraphicOrient = Matrix.CreateFromYawPitchRoll(xRota...
- Fri Aug 20, 2010 12:23 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
yeah, it kind of slowly walks uphill from a dead stop. But this is not really a bad thing I figured. I will just make a "walk" animation, when the speed is below say 2 m/s the walk animation will be triggered (so the person can't get stuck at a certain point, since he always can walk out o...
- Fri Aug 20, 2010 2:51 am
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
haha yeah that worked beautifull! It moves quite realistic, some flaws still, it can slowly run "uphill" I guess this is just lowering the maxslope right? I need to orient my model as well now. I guess raying 2 times will be the best way right? raying from the nose down and from the tail d...
- Thu Aug 19, 2010 10:04 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
when I set it to 5, the character does not move at all. While the hill is steep enough to make it slideable (it's about 30 degrees), I really don't get how the class works, do I have to apply a force or something to get the sledge going? To me its seems like the best solution would just be to keep t...
- Wed Aug 18, 2010 7:20 pm
- Forum: Questions and Help
- Topic: prevent entity from spinning
- Replies: 32
- Views: 29313
Re: prevent entity from spinning
oke thanks will try that later. the true friction for a snowboard is 0.2 or around that region, sliding works beautifull with this value, 5-10 is just way too high. But when it gets speed, it should only move in the direction of the character right? how can I get this done? because now the camera is...