May 23, 2012, 02:09:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Look At Me When I'm Talking to You  (Read 589 times)
Squat
Hero Member
*****
Posts: 592


View Profile
« on: July 15, 2009, 04:14:38 PM »

I need some samples to help me along my way please. As always, I've tuned this list to be as useful to a large array of purposes so that everybody could use it too. I'm willing to trade or make public contributions to get these.

I have an NPC prop in my game that I can walk up to and open up a menu.

I want the NPC, which is fully rigged, to look at the local client whenever it's within radius and within a limit. I would like to control both the eyes and the head and keep it from turning or breaking its neck. I eventually plan to animate him turning in place so he can view you from all angles, but I still need to limit the head and eyes.

I know the lookat command and how write limits, but how to get control over bones again? A 'small' sample of a boned object that has a particular bone aim at you is all we need. I'm certain others want this too.

It's not actually that simple, I think. basically i'm afraid to try myself because I confuse it before I get going. I'm just too inexperienced to know how to exactly track what angle the whole body is at (or the neck bone's angle in world space) and then translate how much it can or should turn off that weird bit of data. I understand matrices on a primitive level and perhaps I'm complicating it, but just adding the numbers seems too easy. Anyway, I can fake rotation limits if I strictly place NPC's at certain angles, but I want them to eventually be dynamic and move around and still have those limits in proper relation.

Do the new (soon to be released) characters display the player's viewing angle and show which way they're aiming by controling their bones? I need that.

Logged
gekido
Guest
« Reply #1 on: July 17, 2009, 11:51:36 PM »

Basically what you need are 2 animations - one is a look left / right animation and the second is a look up / down animation.  the engine then allows you to control the blending of the animations from script so you can then adjust how much the character is looking up / down and so on.

I know that john had the characters in steer madness setup so that you could automatically just say 'lookat ( target)' but i'll have to bug him a bit more to figure out how that was setup.

this same kind of system is how i'm doing things like lean left / right, as well as look up / down for the character example that i'm working on (yes, still - been a bit insane around here since the 2.0 release).

it will be available very soon though, i'm down to the final few animations that i need to re-export for the soldier character and then he will be made available to everyone to play with.

Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #2 on: July 18, 2009, 08:34:47 AM »

I remember there was an old turret script that always looked at you, but it would need limitations of course. The matter of when it starts looking is just a a trigger input radius. But how to limit the rotation, don't know but I know that you know when you see the script Smiley
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #3 on: July 18, 2009, 03:03:01 PM »

So with blending animations, we effectively don't really need to be able to script bone positions and angles, but does that mean that we actually can't do that? I was assuming we could get control over the bones in an object. I remember the turret, but that's a simpler situation since there are separate meshes, which is easier to control. I basically just need whatever prelines and the syntax for getting a bone by name and being able to change its angle in code. I hope we can, but I think there are other workarounds.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!