How do i code double jumps to character controller on unity?

heres my script. i just started coding like 3 days ago so idk much.

 public class playermovement : MonoBehaviour {    Vector3 velocity;     public float gravity = -9.81f;     public CharacterController controller;     public Transform groundCheck;     public float groundDistance = 0f;     public LayerMask groundMask;     bool isGrounded;     public float jumpHeight = 3f;             // Update is called once per frame     void Update()     {         velocity.y += gravity * Time.deltaTime;         controller.Move(velocity * Time.deltaTime);          isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);         if (isGrounded && velocity.y < 0)         {              velocity.y = -2f;         }         if (Input.GetButtonDown("Jump") && isGrounded)         {             velocity.y = Mathf.Sqrt(jumpHeight * -2 * gravity);          }                } } 

how to change a 3D character and other assets in-game

I want to make a game in which the 3D character is customizable. For example, there will be a selection of clothes that the character can wear, and when the player clicks on one of them, the character will wear that clothing item and after that, the player must also be able to change the colour of the clothing etc.. in-game. The character, the clothing and other assets are all going to be modelled in blender. My game is going to be made in unity. My question is how exactly i can accomplish this (i.e. change what the character is wearing and change the colour of the clothing), in the unity game engine?

Thanks

Unity2D: Character goes up and down during idle animation

My character is idling but his feet are changing position during the animation: it seems he’s floating. I would like to have the character with his feet stuck.

Video to visualize the issue: https://vimeo.com/568057364

As you can see, the feet are going up and down. I’ve also tried to animate the collider in order to follow the feet, but that attempt didn’t solve the issue.

Box collider not colliding with Character controller

I have a player with a CharacterController attached. The player can move around.

There are obstacles which the player can collide with. These obstacles have a BoxCollider and a Rigidbody which is set to "kinematic" as I don’t want these obstacles to be affected by physics and they don’t move.

Every time the player collides with an obstacle he receives some damage. To do that I used this piece of code on the obstacle.

private void OnCollisionEnter(Collision collision) {      print("hit");      if (collision.gameObject.tag == "Player") {             collision.gameObject.GetComponent<Player>().TakeDamage(damage);             print("hit player");         }     } 

But the obstacle doesn’t register collision events from the Player.

The player on the other hand is able to receive collision from the obstacle in the OnControllerColliderHit() and I can set the damage received in there but I’m not sure if that’s a good way.

6 random character prefix automatically added to entire DB tables, how / why?

I’m working on a site, live on server. I’m using Navicat for working with the DB. I have the WP DB opened and am 100% sure the tables were just standard tables, using standard wp_ prefix.

While I’m working on another screen in admin area, I needed some user-meta info, I refresh the already opened DB.. and suddenly ALL tables have 6 random character prefix automatically added to entire DB tables!

So now instead of having one table.. wp_usermeta
I now have.. aojsfj_wp_usermeta

Now, opening for example aojsfj_wp_usermeta is not a list of users, it’s just ONE user’s meta. So now the DB has created all separate tables per the few (7) test user accounts, prefixing them with 6 random characters.

Can someone enlighten me on why / how this has happened? So far everything still seems to be working, but the DB + all these new tables can’t be good!

Unreal Engine 4 AI Character Pawn Entirely Unresponsive to Movement Commands

I’m new to game development and to Unreal but I cannot for the life of me get my AI character pawn to move at all using any method I know.

I’m developing a 2d Sidescroller game using a Tilemap. I have made sure collision is set up with the map and tiles, the player character can interact with it all just fine, and I made sure to widen the collision thickness of the map so that the navmesh can properly appear (as seen with the green areas).

Nav Mesh loading. AI spawns in the air and falls down so I know he isn’t overlapping with the ground Nav Mesh loading. AI spawns in the air and falls down so I know he isn't overlapping with the ground

I’ve disabled and enabled collision for the static mesh cube component in the character pawn, but he still doesn’t move. The goal is to get him to follow the player when he sees him. The pawnsensing trigger works just fine, as I had it print whenever he sees him, and he even properly gets to the point of executing the "follow player" function (the print statement works).

However, using AIMoveTo fails every time. I’ve tried putting the player as the target, the player’s worldLocation as a vector, and even an arbitrary point vector to the right of the AI but AIMoveTo fails every time.

I’ve deleted and replaced the NavMesh, and I’ve even tried completely skipping using AIMoveTo and just using Add Movement Input in both the AI Thinking Blueprint and Character Pawn Blueprint but neither make it move. I literally put an Add Movement Input function on the Pawn’s event tick but it never moves.

Any suggestions?

Code: AI Logic event is triggered every tick AI Logic event is triggered every tick

Character Pawn Tick (for debugging). Does not cause the Pawn to move Character Pawn Tick (for debugging). Does not cause the Pawn to move

How should I as a GM handle a player *character* who has a bad memory?

There is a player in my campaign who’s characters defining trait is that they have a bad memory.

I like creating mechanical representations of character traits if it makes sense to do so.

I’ve given the player a Homebrew feat called "bad memory" that basically says "roll disadvantage on any memory based intelligence checks".

My reasoning being that a character with bad memory should not have the same statistical probability of rolling well on a memory based check as a character with a good memory.

This player is adamantly fighting me on this though.

This is his reasoning:

The game already has the scaffolding and complexity in the locations where it is required. There are reasons why things like forgetfulness are included in the traits and features yet don’t have mechanics attached to them. If it was appropriate they would have been added by the devs. Mechanics which make it harder to use a character, and especially mechanics which remove abilities from players, are things which are only used in very rare cases and only ever for very short periods.

Note: This player is a very good role-player. It feels wrong to me to not represent the bad memory mechanically though.

How should I as a GM handle this situation?

Can a character without arms cast spells with somatic components?

My DM and I have been having friendly arguments, and we recently came to what would happen if my character lost all their limbs.

As a gnome beastmaster I said I would always sit on my mount and use mage hand (from magic initiate) when I need to eat or lift things. HOWEVER he argues I wouldn’t be able to perform the somatic component.

So, I ask: is there a way to cast spells without arms? My argument is that since I am learning the cantrip after losing my arms I would have learned it in a way that works with my stumps, but he points out the PHB is pretty clear you need a free hand.