3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Rotating a bone with mouse
[Re: txesmi]
#455325
10/16/15 21:37
10/16/15 21:37
|
Joined: Jun 2010
Posts: 590 California
Ruben
OP
User
|
OP
User
Joined: Jun 2010
Posts: 590
California
|
So, I went ahead and tried this:
...
#define BEND_WAIST skill17
...
action player_code()
{
...
ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
// given to the "waist" bone in MED.
my.BEND_WAIST += 5 * mouse_force.y;
...
while(1)
{
...
ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));
...
wait(1)
}
}
Still nothing is happening when I move my mouse up and down. I do notice that after I place the two bones in the player model and save it, all animations are not working at all. For example, when the player moves forward, the player is not moving its body like it is walking. It is just a stiff standing body moving forward with no animation. Same thing if I click my left mouse button which normally showed an attack animation. It is not there anymore. I wonder if this has something to do with my the player model is not bending forward or backward at the waist when moving the mouse up or down?
Last edited by Ruben; 10/16/15 21:39.
|
|
|
Re: Rotating a bone with mouse
[Re: Dico]
#455328
10/16/15 22:11
10/16/15 22:11
|
Joined: Jun 2010
Posts: 590 California
Ruben
OP
User
|
OP
User
Joined: Jun 2010
Posts: 590
California
|
add this in loop my.BEND_WAIST += 5 * mouse_force.y; Did it:
...
#define BEND_WAIST skill17
...
action player_code()
{
...
ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
// given to the "waist" bone in MED.
...
while(1)
{
...
my.BEND_WAIST += 5 * mouse_force.y;
ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));
...
wait(1)
}
}
...still nothing.
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455330
10/16/15 22:45
10/16/15 22:45
|
Malice
Unregistered
|
Malice
Unregistered
|
Lets do some debugging We are going to check if the bone functions are failing
...
#define BEND_WAIST skill17
...
action player_code()
{
...
var this=0;
var that =0 ;
var more =0;
this= ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
// given to the "waist" bone in MED.
...
while(1)
{
...
my.BEND_WAIST += 5 * mouse_force.y;
that=ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));
...
DEBUG_VAR(this,50);
DEBUG_VAR(that,100);
wait(1)
}
}
You should see 2 red numbers on scene, YOU SHOULD NOT see 0(zero's) If you see 0(zero's) than THIS or THAT is failing
Last edited by Malice; 10/16/15 22:47.
|
|
|
Re: Rotating a bone with mouse
[Re: Ruben]
#455332
10/17/15 00:18
10/17/15 00:18
|
Malice
Unregistered
|
Malice
Unregistered
|
Yes they are NOT failing.. Odd! http://www.conitec.net/beta/macros.htmplease look in the manual under the 'Percompiler' section for the link to "macro's" -- EDIT - perhaps the problem is the vector (x,my.BEND_WAIST,z); maybe move the my.BEND--- to the x place.
Last edited by Malice; 10/17/15 00:21.
|
|
|
Re: Rotating a bone with mouse
[Re: ]
#455333
10/17/15 00:27
10/17/15 00:27
|
Malice
Unregistered
|
Malice
Unregistered
|
One idea - are any vertics actual attached to the bone? You can place a bone without binding it in med. You may have done so.
another test - ent_bonerotate(my,"bone",vector(0,5*time_step,0));
You should see movement!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|