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!


Member Since 02 Mar 2013
Offline Last Active Aug 04 2014 10:48 AM

Posts I've Made

In Topic: Book/tutorials for 3d game programming c++

03 September 2013 - 06:16 PM

If you only have a basic knowledge of C, I would work on expanding your general knowledge before cracking down on graphics or other more specific programming.


I started off C++ with http://www.amazon.com/Beginning-C-Through-Game-Programming/dp/1435457420 which, despite the title, is very much a general C++ book simply taught from the perspective of games. If you don't want to get a book, http://www.learncpp.com/ is a great site for C++ tutorials. While you would eventually need to learn to work with either DirectX or OpenGL (or both) to build your own engine, I wouldn't recommend doing so without having solid fundamentals. If you're solid on all, or at least most, of the topics on learncpp.com, then I'd say you're ready to move on.

In Topic: Smooth camera movements/rotations (conversion between eye&up vector and q...

02 September 2013 - 06:34 PM

Hey taytay,

I'd recommend reading this tutorial: http://ogldev.atspace.co.uk/www/tutorial15/tutorial15.html

The site itself has OpenGL tutorials, but the concepts in this tutorial are universal and would easily work with whatever you're using.


Basically, quaternions allow you to rotate around any axis you want, as opposed to strictly the x, y, or z axes.

While the typical first-person camera rotates left and right around a fixed axis (the y-axis), vertical camera rotation happens around the cross product of the y-axis and the target vector, which is not fixed. So what you want isn't to convert between vectors and quaternions, but rather to use quaternions to rotate vectors.

The tutorial above doesn't go too deep into the math involved, but it shows how you would go about doing this in a practical sense.


And yes, quaternions can be interpolated (spherical linear interpolation, or slerp, is used often in 3D animation). However, slerping (any interpolation, really) only works when you have two points--a start and an end--and you want to move between the two. Slerping isn't used to figure out where the end point should be.


Hope this helps!

In Topic: [Update 8pm GMT] UDK: Model's animations aren't playing!

19 March 2013 - 07:26 PM

If it were one thing, I'd guess it's the AnimNodeSequence object in the DefaultProperties. UTPawn already has two AnimNodeSequences called MeshSequenceA and MeshSequenceB, so trying to overwrite MeshSequenceA might be causing the problem. Try commenting out those two lines in your pawn's DefaultProperties (right above the commented-out DynamicLightEnvironment) and see if that helps.


Failing that, there's always the obligatory "make sure the animation actually works in the editor" advice. :P


Also, I've heard that DefaultProperties doesn't like spaces with declarations, like "BirdWalkAnim = WalkOnLand"... Apparently it's better to write "BirdWalkAnim=WalkOnLand". I've personally never had any problem with it either way, but can't hurt to try, even though it's probably not the source of the problem.


Hope something here works for you :D

In Topic: [Update 8pm GMT] UDK: Model's animations aren't playing!

19 March 2013 - 03:59 PM

Glad to hear that the collision cylinder's aligned now biggrin.png


As for animations, the PlayAnim function takes a name as the first parameter, not an AnimSet (which is what I assume you're trying to call with that line).

If the anim name you want to play is WalkOnLand, then assuming that you have BirdWalkAnim set in the DefaultProperties, you'd use the line:

Pawn.Mesh.PlayAnim( BirdPawn(Pawn).BirdWalkAnim, , True );


There's no need to mess with the file path OR anim set with the PlayAnim function, which will search the SkeletalMeshComponent's AnimSets array to find the correct animation.

In Topic: [Update 8pm GMT] UDK: Model's animations aren't playing!

17 March 2013 - 08:13 AM

Yeah, that's super common. Characters smaller than bullets and guns bigger than buildings. :P


I'd just place the model in a level and scale it however much you need it to be in UDK. Take note of how much you scaled it, then go into blender or any other modeling tool, scale it to that size in there, and reimport. A trick to help with that is to have your (correctly-scaled) character model in the scene when you're modeling, to use as a reference for scale.


But yeah, definitely correct the scale in your modelling tool and reimport... Dealing with a bunch of models out of scale is way more of a headache than it's worth.