1 registered members (TipmyPip),
18,633
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455344
10/17/15 02:30
10/17/15 02:30
|
Joined: Feb 2012
Posts: 371
Dico
Senior Member
|
Senior Member
Joined: Feb 2012
Posts: 371
|
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455346
10/17/15 04:33
10/17/15 04:33
|
Malice
Unregistered
|
Malice
Unregistered
|
Well let Dico take over.
Notes - All ent_bone function pass(return non-zero), which means the bone, by name was found. Ent_bonerotate (..constant*time_step) shows no visible results, which means the mouse input not the problem. last vertex move in med so have some attachment.
Mal out, peace
|
|
|
Re: Rotating a bone with mouse
[Re: Wjbender]
#455402
10/19/15 09:53
10/19/15 09:53
|
Joined: Jun 2010
Posts: 590 California
Ruben
OP
User
|
OP
User
Joined: Jun 2010
Posts: 590
California
|
Right now, my code looks like this:
...
action player_code()
{
...
ent_bonereset(my,"Bone");
...
while(1)
{
...
ent_bonerotate(my, "Bone", vector(0,camera.tilt,0));
wait(1);
}
...
}
I hate to ask this, but is there a way to limit how far the player model using the ent_bonerotate() function will bend forward and backward at the waist (limit how much the waist bone will rotate?), independent of how far the camera will tilt and rotate behind the player? That way, if I look straight up, the player's head and shoulders will not block the camera's view looking straight up?
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455426
10/19/15 17:46
10/19/15 17:46
|
Malice
Unregistered
|
Malice
Unregistered
|
http://www.conitec.net/beta/aclamp.htmclamp(var x,var a,var b);
var limit =0 ;
while(x)
{
.....
limit=clamp(camera.tilt,0,90); //min max
ent_bonerotate(my, "Bone", vector(0,limit,0));
..........
}
Beating a dead horse...
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455442
10/20/15 01:56
10/20/15 01:56
|
Malice
Unregistered
|
Malice
Unregistered
|
Welcome Ruben .. Add Clamp() to your memory, you'll find many times you'll need it. floor() and cycle() and abs() and sign() and of course random/random_seed(). All found in that same var arithmetics section of the manual, all very useful.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|