Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Synthesizer

Member Since 11 Dec 2007
Offline Last Active Mar 02 2015 12:02 PM

Posts I've Made

In Topic: [XNA] Sprite in 3D World - problem with camera movement

29 September 2013 - 06:13 PM

Oh boy!! Thanks so much! It was actually not the view, but the perspective one! I was erroneously recalculating it each frame (why?! lol), and more over, recalculating it with a different field of view (PI/4) than the camera one (PI/3)!
 

So your suggestion made me check the matrices code & find the mistake. Now it works like a charm!! So thanks a ton!!! :)

 

Synth


In Topic: [XNA] Sprite in 3D World - problem with camera movement

26 September 2013 - 06:13 PM

hi,

thanks for your answer.
I'm not sure I understand what you mean. I arbitrarily set the position of it, according to where I want it to be:

int i=0;

sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(0, 0));
sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(1, 0));
sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(1, 1));
sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(0, 0));
sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(1, 1));
sprite.vertexPositionNormalTexture[i++] = new VertexPositionNormalTexture(sprite.position, sprite.normal, new Vector2(0, 1));

sprite.vertexBuffer.SetData(sprite.vertexPositionNormalTexture);

For the moment it's static: I'm not translating, rotating or scaling it during gameplay (i'm just setting it's size in the VS).

"I would scale by width and height after the transform" - what do you mean? After the camera transform in the VS? If I do that, it will even be worse, as it's going to be camera-oriented i think : will always face the camera & move together with it.

 

I can be completely wrong though, I'm not in my brightest days :)


In Topic: Collision - BoundingSphere vs BoundingBoxes Corners

14 August 2012 - 06:07 PM

Thank you,
I think the case of the sphere completely inside the box is almost impossible (the wall should be very thick & the player should move very quickly), but I'll analize the other case together with the info you linked. It seems pretty much interesting.

Thanks again,
Synth

In Topic: What kind of tech would something like this take?

13 August 2012 - 08:35 PM

I'm also not sure what you mean, but I don't know any "technology" that will make this for you (if with tech you mean libraries, programs or prebuilt stuff).

Basically you have to create a project (a program) in a specific programming language (within a particular development interface like "Visual Studio" for example). It will control the logic of your charactes (also created in there by yourself). You create the visible models in a (for example) 3D / 2D program to later import them in your project & control them logically.

I guess you have to program all the possible actions & as the guys here said you may randomize & trigger them, or trigger them according to decisions on what is happening.

For example, develop a "run" action (an animation made in a 3D/2D animation software; the actual movement: vectorial translation of the character in a programming language, etc), then a "walk", a "stand", etc. Get a random number & according to it, make one character walk, another, run & so on.


For dialogs you should check about "decision trees". For different states & activities you may like to read about "UML State Machine", "UML Activity diagrams": http://en.wikipedia....L_state_machine
http://en.wikipedia....ctivity_diagram

There's a looooot to implement & it's definately not a matter of 2 or 3 weeks.

For development tools I like to use C# and XNA. I also like to build the AI by myself, always with the help of the pros that have previously answered you here.
Hope I gave u some light.

Cheers,
Synth

In Topic: [XNA] Spotlight cone model rotation. ViewMatrix Decompose Problem.

03 August 2012 - 12:28 PM

Hi Matt,
thanks for your answer, the info you gave me tempted me to dig more on matrices & now I understand them much better Posted Image

After I read more, played with matrices & applied the Matrix.CreateWorld, the problem persisted anyway. I spent all the afternoon double & triple checking everything & I wasn't able to find anything wrong in the code! So I created the model over & over again... I recorded a video showing the problem & I was already writing here a new message when I had an insight...: "am I exporting the model left handed...?" Daaaaaaamn that was the problem! Posted Image Half of me felt as a dumb @ss, but the other half shouted: "YEEEEEEAAAH!!"

hehe, so it works like a charm!
I actually want to thank you for pointing me out this info (I didn't know how matrices were storing this data) as now I understand it & it helps me for future usages!

Cheers,
Synth

PARTNERS