#i did and it shoots okay when i shoot

1 messages · Page 1 of 1 (latest)

old minnow
#

Do you mirror the gun when you look to the left?

#

Look left, then go to the Scene View and click on the fire point object

gusty coral
#

yea

old minnow
#

see which way the green arrow points

#

you can push ctrl-1 to jump to the scene view

gusty coral
old minnow
#

in case moving the mouse to click on the "Scene" tab messes it up

old minnow
# gusty coral

is this while you're looking left? looks like the gun's on your right side to me

gusty coral
gusty coral
#

yea thats the problem

old minnow
#

Are you only mirroring the Pistol object?

#

I guess that'd cause the issue

gusty coral
old minnow
#

hm, but

#

aimTransform.localScale = aimLocalScale;

gusty coral
old minnow
#

Oh, you're flipping it vertically

#

Flip it horizontally. You might need to change how you rotate the gun to compensate for that

gusty coral
#

oof how

old minnow
#

Although, to be sure, can you show me what the scene view looks like if you have the "Aim" object selected?

gusty coral
old minnow
#

ah, Aim is centered on the player, okay

#

So what happens if you don't set the scale at all?

#

does the gun wind up being upside-down, but still pointing the right way?

gusty coral
#

yea

old minnow
#

Okay. I see what's going on.

#

So you make the Aim object's X scale negative,

#

I would expect that to flip the gun onto the other side entirely.

gusty coral
#

yes

old minnow
#

I would think this would put the gun on the wrong side entirely when aiming left

gusty coral
#

wait what u want me to do

old minnow
#

Make it so that the scale is always 0.35, 0.35

#

Show me what it looks like when you aim left.

gusty coral
old minnow
#

Oh! I misread it. I thought you were setting the X scale to be negative

#

okay that makes way more sense

gusty coral
#

lol

old minnow
# gusty coral

still, show me what it looks like when you don't make the Y scale negative

#

aim up and left

gusty coral
#

this is up with this code

old minnow
#

I need to see it without the Y scale being set to be negative.

#

Make it always be 0.35

#

I want to see how it behaves when you're aiming up and to the left. 45 degree angle or something.

gusty coral
#

okay i changed y to positive and now it works

#

like shooting and everything workds

#

thanks

old minnow
#

ah, good. I was having trouble imagining how it was changing the gun's position and rotation

#

If you want to flip the gun, I would make a new "gun" object that you parent those four objects to

#

and then flip that instead

#

instead of flipping the Aim object

gusty coral
#

okay thanks

old minnow
#

to visualize the difference

#

first one is the original

#

second one mirrors the holder