Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Ray gun blast, position bullet

Author
Message
locecode
5
Years of Service
User Offline
Joined: 11th Apr 2019
Location:
Posted: 10th May 2019 07:21
Ok, so I have a gun, with effects, and the effect is the bullet, it is glued to the gun with glue object to limb.

I then am positioning the bullet after and it does all this just fine, TILL.

Till I shoot the bullet and unglue the object and then it positions itself to the left of the gun then moves, so it looks like the bullet is comming from the left side of the gun.

I'm confused on this one.

Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th May 2019 13:26 Edited at: 10th May 2019 13:27
It probably keeps the offsets (versus its mesh center) that you gave it while doing precise positioning after glueing earlier.
try to add (after unglueing) : Offset limb 34,0,0,0,0
Also why do you scale rescale the object if you hide it?
hope it helps
Cheers
locecode
5
Years of Service
User Offline
Joined: 11th Apr 2019
Location:
Posted: 10th May 2019 14:05
Scorpyo

Thank you for the advice, I will try it out.

I am scaling and upscaling as a undecided test, I'm not sure If I want to show the effect on the gun at all times or not.
locecode
5
Years of Service
User Offline
Joined: 11th Apr 2019
Location:
Posted: 11th May 2019 09:21
Scorpyo

This did not help. I'm not sure what to do, if I position it is never aligns from left to right as I rotate, but If I glue object it is always to the left.
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 12th May 2019 08:26
Difficult to understand what's going on then.
Can you post screenshots of the following without hiding object 34 ? :

1- right after glueing
2- after glueing and repositioning
3- right after unglueing
locecode
5
Years of Service
User Offline
Joined: 11th Apr 2019
Location:
Posted: 13th May 2019 20:17
Yes, please give me a day, I will do it today some time.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jul 2019 21:55
I typically will do this in a different way. When adding limbs to the model, I will place one at each end of the gun barrel. I position the bullet at the back of the gun and point it toward the limb at the end of the barrel. While playing the fire gun animation I also look at the animation frames to make sure the gun is pointing out and then place / fire the bullet.



So many games to code.....so little time.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 14th Jul 2019 01:15

Why glue the bullet to the gun at all?
Why not just set the bullet's position and angle to the same as the gun's and go from there?

Also, are you using INTERSECT OBJECT? If so, you only need an invisible object to measure the distance to the point of impact.
I can provide a simple demo if you like. It works on all objects.
Send your parents to noisy sprite demo hell... enter the D-Zone

Login to post a reply

Server time is: 2024-04-20 09:29:06
Your offset time is: 2024-04-20 09:29:06