Ok I’m bored say something

If you want to handle 3D movement, grab your forward vector and multiply that by a new vector3 that consists of your horizontal and vertical input, do not apply anything to the Y.

var direction = object.transform.forward * vector3(h, 0, v);

A cool trick if you handle analogue movement is to grab the lenght of the input if it's a vector
let magnitude = input.lenght()

then add that when calculating the velocity

velocity = direction * speed * magnitude

this will let you smoothly handle analogue input, if the player moves the stick slowly the object will move accordingly instead of reaching it's maximum velocity.

you could mimic this with lerp if you are using keyboard input but might require additional input.
 
If you want to handle 3D movement, grab your forward vector and multiply that by a new vector3 that consists of your horizontal and vertical input, do not apply anything to the Y.

var direction = object.transform.forward * vector3(h, 0, v);

A cool trick if you handle analogue movement is to grab the lenght of the input if it's a vector
let magnitude = input.lenght()

then add that when calculating the velocity

velocity = direction * speed * magnitude

this will let you smoothly handle analogue input, if the player moves the stick slowly the object will move accordingly instead of reaching it's maximum velocity.

you could mimic this with lerp if you are using keyboard input but might require additional input.
Call The Midwife Help GIF by PBS

Did AI put you up to this point?
 
It's okay to stab a dragon with a wooden stake because it's not illegal.
 
I have a crippling addiction to Fire Emblem and being given random compliments by strangers, especially by men since I am attracted to them.

That being said, these two addictions contradict each other. I live in a world of very little joy.
 
I have a crippling addiction to Fire Emblem and being given random compliments by strangers, especially by men since I am attracted to them.

That being said, these two addictions contradict each other. I live in a world of very little joy.
We could see an upcoming Fire Emblem title for Nintendo Switch 2 soon, don't give up hope yet
 
here's a random thing that keeps popping up in my head.

ive been using vscode for a while before moving to neovim. neovim is great, i'm so grateful that i can move around quickly. unfortunately, setting up plugins and all that is a pain - it is such a pain compared to vscode. sometimes it's the plugins that makes or break the code editor.

as someone who enjoys building sites for fun - testing my API endpoints is an important part of the workflow. thunderclient on vscode does this masterfully. unfortunately there's not really an alternative to that on neovim, and i have to result to writing the whole endpoint, headers, and req body manually in a curl statement and pipe responses through jq.

if i'm testing only a few endpoints that's ok. but if i'm building a "full-stack" site, i'm gna have a lot of API endpoints and writing the whole curl statement over and over again is a chore so i end up opening vscode just for thunderclient. a lot of neovim users who think they're superior to users of other code editors just say "ooo just use curl" but tech is there to make things better in your life, so why wld i make it harder for myself by using curl statements.

if there's a good plugin like thunderclient on neovim i'd be grateful. i don't care if it's a curl wrapper as long as it takes away the cumbersome process of writing the whole curl statement in the terminal.

in the absence of it, i'll try to build my own.
 
We're pushing
down in a hole right before our eyes.
The rising heat and the melting ice.
Now all we care for is
Blood & Satellites.
 
my anus is having a nice day.png

please don't click unless you have a sick sense of humor also it's kinda NSFW (this might get modded but i did spoiler it and did a warning about it
 
Using enums for simple state handling in your games is the best approach but only if your entity will have a specific state at a given time like: idle, moving, shooting but if there's more complex states like in the air shooting, considers a state machine pattern with objects and a multi layered approach.

Also think of ways of passing values to states, a dictionary works.
 

Users who are viewing this thread

Connect with us

Support this Site

RGT relies on you to stay afloat. Help covering the site costs and get some pretty Level 7 perks too.

Featured Video

Latest Threads

Tell us your favorite game genres

I start adventure virtual novel simple RPG that I'm still playing some RPG to know and also Lego...
Read more

Initial D Thread


Thoughts on this? Heard of it in High school but never really sat down with...
Read more

Favorite "Strange" Drinks

I thought I'd ask since I was just about to make my own Mezzo Mix, or Spezi; a cola and orange...
Read more

Am I tripping? Or was the Sega Master System very elusive when it was current?

I had a discussion with my older brother the other day, and I was asking him if he remembers...
Read more

Development of FF7 Remake part 3 and Kingdom Hearts 4 are on schedule

ffvii-remake-cloud-barret-960x540.jpg

The Man behind both the Final Fantasy 7 Remake trilogy and the Kingdom Hearts...
Read more

Online statistics

Members online
135
Guests online
419
Total visitors
554

Forum statistics

Threads
12,598
Messages
307,360
Members
867,022
Latest member
Sleepy_joe15

Advertisers

Back
Top