#Golf Ball

1 messages · Page 1 of 1 (latest)

nova raven
#

I mean like in real life,in direction of camera

hard rover
#

what does the direction of the camera have to do with the golf ball

nova raven
#

just a sec

#

i wanna make result like this

hard rover
nova raven
#

i have it shooting

#

do i need to share code

hard rover
#

and the issue is with the camera following?

nova raven
#

no

nova raven
#

so if player look in other direction it will shoot in cam direction

hard rover
#

the shooting and the camera's position isn't really related

#

the camera follows the ball, and you can rotate the camera around the ball's position

#

and then i assume there's a sort of dragging which allows you to get the direction of where to shoot

nova raven
#

can i just share cod

hard rover
#

yeah sure

#

but what's the issue

nova raven
hard rover
#
void Shoot(Vector3 Direction)
    {
        rb.AddForce(new Vector3(cam.transform.forward.x, cam.transform.forward.y, cam.transform.forward.z) * forceMultiplier);

    }

this part here, you pass in the direction but it's never used

#

you should add force of direction.normalized * forceMultiplier

#

in ForceMode.Impulse because it's a one time shot

#

because it shouldn't be related to the direction of the camera

nova raven
#

it should

hard rover
#

what

nova raven
#

it need to shoot in camera DIRECATION

hard rover
#

you're calculating the direction based on the start and end of the drag

nova raven
#

i need to calculate direction from cam

hard rover
#

i'm not sure what direction you're trying to calculate

nova raven
#

i wanna make shoot system like this

#

just a sec

hard rover
#

in that system the ball still doesn't move according to the camera, it moves according the start and end point of the drag

silent plank
#

@nova raven Show your actual game footage and explain exactly what you want. then we can help

nova raven
#

i didnt get what you want

hard rover
#

a video of how it's currently working

silent plank
#

send a video of your game

nova raven
#

i cant

#

it s too much mb

nova raven
#

(sorry for ping :))

hard rover
#

so what's the actual issue then

#

i told you how to get what you're trying to do

nova raven
#

its working but not properly

#

(btw i can send you email with footage)

hard rover
#

or you can use a site like streamable

silent plank
#

You cannot develope like that.

#

You have too much grass.

nova raven
#

ik

hard rover
#

i can't really tell what's happening

nova raven
#

why

silent plank
#

Because its 7fps?

hard rover
#

there's also a square covering a quarter of the screen

nova raven
#

my fault 🙂

#

can i resend

hard rover
#

yeah

nova raven
#

uploading

#

@hard rover , @silent plank ^

silent plank
#

looks like you're trying to make it go right

#

Yes?

nova raven
#

(sorry for pings v2)

silent plank
#

You havent told the code to do that.

nova raven
silent plank
#

it went back

#

So its working

nova raven
#

no

#

it doesnt

silent plank
#

it literally went backwards

nova raven
#

it never went back (ball)

#

its going only left right up for now

silent plank
#

Bro

#

Listen to me

#

it went backwards. Both times.

nova raven
#

are you talking about moments it came and go away from box?

silent plank
#

I'm over it. You need to explain what you want. Or else i cant help

#

Dragging the mouse does nothing. youy're not using it

nova raven
#

bro

#

im literally using it

#

to throw it

silent plank
#

you're using camera.forward

#

Only.

#

you are not using mousepress or release

#

At all

nova raven
#

ok can i just draw what i want

silent plank
#

No

#

Explain it in words

nova raven
#

i cant

#

im not english native

#

im Rus

#

the red arrows are for forward/backward