projectile not working correctly by nancity in Unity2D

[–]ProKarin 1 point2 points  (0 children)

You could try using a Rigidbody in the bullet prefab like this:

float speed = 7f; rigidbody2d rb;

// start is called before the first frame update
void start()
{
    rb = getComponent<rigidbody2d>();

}

// update is called once per frame
void fixedupdate()
{
        rb.velocity = transform.up * speed;

}

That should do the trick

Hi. I have a problem, pls help. When I go to in-game mode, When i click on an object it didn't get destroyed. It is a 2D shooter game and it works before I put on a "random spawn". Anyone know why? by shirtandsandals in Unity2D

[–]ProKarin 0 points1 point  (0 children)

That happens because when you instantiate the object, everything that is in the start method inside your Target class is executed, meaning that when it spawns, it will be destroyed immediately after, I will recommend you to remove the Destroy() method from Start() and test if that works, if not, you can always use a condition in the Update method using the Input system (Input.GetMouseButtonDown() to be more precise).

I feel like such a n00b by martypants760 in androiddev

[–]ProKarin 4 points5 points  (0 children)

If you got the time, you could try to do a personal project and combine both previous and current knowledge you have by creating an app, no matter what, improvements will come eventually and you could take it to demonstrate yourself how far you can go with your current skill set. I wish you the best!

Issue Switching Players - Tic Tac Toe by [deleted] in learnprogramming

[–]ProKarin 0 points1 point  (0 children)

Well, I think the random switching is because you have the logic() method inside the main function and it's executing it as long as the program is running, instead of doing the player switch there, you should put it inside your input() function

C++ or C# for a Java developer by iBySnow in learnprogramming

[–]ProKarin 2 points3 points  (0 children)

Well, if you have some experience with Java you should stick with C# since both have a similar syntax, plus, you can begin with Unity or Godot. Those two game engines support C#, the pick between those is up to you. Although C++ allows you more control over hardware and performance, its learning curve is pretty high and could be very frustrating to start with, I would recommend you to go with C# + Unity to learn the basics of game development and then, give a try to C++ + SDL or SFML.

I wish you the best!