#Before, how was the character being

1 messages · Page 1 of 1 (latest)

lament juniper
#

We should probably make a thread at this point lol

#

but it looks like it's mouse-driven. Get the mouse location, scale the rotation smoothly to play the turn in place animation

north wing
#

Does the capsule rotate at all?

#

make it visible and see

#

could be that its set up as a static capsule and the mesh or bones rotate inside it

lament juniper
#

yes, the capsule is rotating

north wing
#

thats in the old setup?

lament juniper
#

Yeah

north wing
#

how is it rotating, using control rotation?

lament juniper
#

SmoothStrafeVector

north wing
#

you can just plug control rotation yaw into set actor rotation there

#

or just opt in to using it

lament juniper
north wing
#

thats all fine

#

feed control rotation yaw here

#

or just opt in to using control rtation yaw for it, it'll end up with the same result

lament juniper
#

So like this?

north wing
#

you don't need hit result under cursor anymore, the aim vector (which used to be under cursor) is now going to be along the line from character head to character head + controlrotation.forward * SomeDistance

#

you following that? The point that represents where the character is aiming towards is defined by tracing from their head in control rotation direction

lament juniper
#

so replacing the trace hit with something like this, then?

north wing
#

or just the capsule location, it'll be close enough

#

but first confirm that the mouse can rotate dude around

#

mouse is now DIRECTLY controlling dudes rotation, not indirectly through the camera trace

lament juniper
#

he's not moving at all

#

It was hooked on show mouse cursor before, I just unhooked it

#

debug line looks off, too

#

althought the debug line was part of the old system, so the blue line isn't really relevant. Shots still leave the barrel and go forward

#

I have this checked on the player character

#

oh this is WEIRD

#

so my mouse control, does not do anything

north wing
#

show what your mouse inputs do right now

lament juniper
#

except when I aim down sight, or use my controller's right thumbstick

#

then the blue line moves

north wing
#

you can lose this

#

since the pawn is just using controller rotation yaw

#

on tick, draw a debug line from head to head + controlrotation.forward x 1000

#

or just use the trace with debug turned on, have tick JUST do that for now

#

make sure moving the mouse rotates that trace around

lament juniper
#

added to my debug function

#

...it doesn't actually draw at all

#

I guess I'm attaching to the wrong point

north wing
#

that code doesn't make any sense

#

forward will be a vector

#

multiply it by 1000, then add that to the socket location

lament juniper
#

I hope this is anywhere close to right. Basically the referenced asset from Self is the helmet model on the character

#

rather than the eyes socket

#

apparently you can't get a forward vector from a socket for some reason

#

and the Z would be the forward axis

#

am I misunderstanding?

#

cuz if I try get control rotation it outputs a rot and not a vector

north wing
#

rotation.getforwardvector

#

that's the vector that the rotations forward direction is in

lament juniper
#

well don't I feel silly

#

oddly enough it's not drawing though

north wing
#

because that's not at all what I'm talking about

#

trace from StartPoint(head bone location, capsule location, whatever) to StartPoint + Rotation.Forward * 1000

#

you need to understand what this math is doing

#

the trace starts at the head

#

and ends at the head location + aim direction x 1000

lament juniper
#

Got it

#

lemmie take video of this, gimmie a second

#

there's some weird shit going on here lmao

#

the best way to describe it is that the yellow line is starting somewhat normal and then flying off into some weird random direction, and this only happens when using controller input. It just doesn't respond to the mouse at all unless I use aim down sights.

north wing
#

Your input mode is defaulting to cursored

#

What pov is this meant to be, top down or more 3rd person?

#

What game is it closest to

lament juniper
#

I don't have the camera finalized yet, but I wanted to define a track in-world to track player movement and steer around like a drone camera watching

#

and the play control would feel like Intravenous (a stealth game with twin stick shooter controls)

north wing
#

Can the character aim up and down or just in a circle?

lament juniper
#

I want there to be up and down aiming, but it would basically be a check under the point location for a valid target (lights, people, etc.)

north wing
#

And is camera meant to rotate around or mostly keep the same angle?

lament juniper
#

kinda like Shadow Complex

#

I want the framing to be flexible. Mostly top down, but potentially shifting to get a better view depending on the situation.

#

60 degrees seemed like a good baseline

#

because it gives a better feeling of depth than straight down 90

north wing
#

Is there meant to be a cursor?

#

If I'm in a normal place and move my mouse up, what should happen

lament juniper
#

Ideally, I'd like to be reliant entirely on the laser, but I wouldn't mind having a backup cursor that expands and contracts in size to represent accuracy

north wing
#

Laser being like a pistol laser right

lament juniper
#

yeah

#

but enemies ideally would be able to react to the laser so the option is there to turn it off

north wing
#

So if there's an enemy above me, how do I aim at him

lament juniper
#

Point his direction with cursor or stick, aim offset moves the point of aim up

#

normal point aiming will aim for center mass

#

aiming down sight will attempt to align for a headshot

#

the system is intended to make the Mozambique Drill very easy to pull off

north wing
#

What's the difference between aiming ahead and aiming up

lament juniper
#

basically I want the player to be able to do this

north wing
#

This is a bit of my project, the aim is in horizontal only

#

You gotta decide how you want your aim done, top down with 3d aim is insanely hard.

lament juniper
#

yeah, I guess that's why MGS2 decided to have first person aiming for that and later entries decided to do a full third person camera

lament juniper
#

but I wanted to maintain as much control as possible- like aiming down sights would let you pinpoint where on the body you want to shoot, not just the head. Like going for a leg shot on purpose to put an enemy on the ground and force their allies to drag them to cover

#

but failing that, just locking on the chest and near the head would be sufficient

#

I want to make the shooting precise but not too easy

#

as far as why I want to keep it top down, it's for accessibility

#

a friend of mine who's helping me on the project has bad motion sickness

#

third person cameras signifigantly exacerbate the condition

#

so the camera shouldn't be moving too much

#

I thought about static cameras like Resident Evil but the problem with that is that it's a stealth game so the player would logically be trying to avoid cameras in the world instead of using them to see

#

but for my MVP I'd be fine just making this work at a 60 degree camera baseline and not worry too much about pans or altitude/tilt adjustments

#

...can you tell this is my first actual game LOL

#

believe it or not this was the least ambitious idea I selected for myself

#

specifically trying to make something simple

#

and it still winds up super complex

#

but there's not a lot of stealth games period, and even less that still do the top down thing in 3D without being basically a direct MGS clone

#

when I look at games I reference, I want to find ways to improve on them somehow

#

but yeah, that's why initially I thought I needed to do a Z offset from the mouse ground vector

#

was so that I could scale that depending on where the player is pointing- if the cursor is on a staircase, add more tilt to bring the point of aim up

#

I guess if I needed to do a special mode for pointing up or down an incline while on it that'd be one thing, but I wanted the player to be able to engage threats in any direction without having to wrestle with the controls like you do in Metal Gear

#

but also while maintaining the "classic" perspective

#

basically thinking about what Metal Gear would have been like had it not conceded to Splinter Cell and became a third person shooter camera style

#

anyway essay over 💀

lament juniper
north wing
#

I'd test various schemes

#

I think high 3rd person would work the best

lament juniper
#

the camera needs to stay pretty stable

lament juniper
#

the other trick is getting it to scale across keyboard and gamepad

#

since I prefer KB/M but my friend likes controller

lament juniper
#

I've come up with an awful workaround

#

...it didn't work lol

lament juniper
#

with a bit more work, it did work

#

it's cursed

#

I basically reverted to the ground based cursor tracking, but redid the weapon system to auto-compensate

#

then run the trace twice

#

once to fill in some variables with the "ideal trajectory from barrel" data, then apply the offset to the player's shots along with recoil sim

north wing
#

If you're doing 3d aiming you gotta do some math so you aim something like "chest height above where the cursor is"