Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Questions
  • Learn Something
What's your question?
  • Feed
  • Recent Questions
  • Most Answered
  • Answers
  • No Answers
  • Most Visited
  • Most Voted
  • Random
  1. Asked: April 5, 2025

    Is there a method to search only the children of a selected gameobject in the hierarchy panel of Unity?

    anonymous user
    Added an answer on April 5, 2025 at 2:14 pm

    Totally feel your pain! The Unity hierarchy search can be super frustrating, especially when it throws everything together in a random order. One thing that might help is using the Filter by Type in the search bar. You can try typing the component type you're looking for directly along with the nameRead more

    Totally feel your pain! The Unity hierarchy search can be super frustrating, especially when it throws everything together in a random order.

    One thing that might help is using the Filter by Type in the search bar. You can try typing the component type you’re looking for directly along with the name of the GameObject. For example, if you’re looking for children with a Collider component, you could type something like Collider parentName in the search field. This could narrow it down a bit, but it might still show you results from other places in the hierarchy.

    Another hack is trying out the Find Objects of Type method in a script, so you can filter through all the children of a specific parent GameObject in a more organized manner. You can create a quick script that searches for all children with a specific component and then prints their names or even highlights them in the editor.

    Example script could look something like this:

    
        using UnityEngine;
    
        public class FindChildren : MonoBehaviour 
        {
            void Start() 
            {
                foreach (Transform child in transform) 
                {
                    if (child.GetComponent() != null) 
                    {
                        Debug.Log(child.name);
                    }
                }
            }
        }
        

    Just attach it to your parent GameObject and run it. This way, you can see which children have that component without sifting through the entire hierarchy.

    It would also be neat if Unity had a feature to limit search scope to just children. Maybe a suggestion for a future update? Who knows!

    Hope this helps a bit! Keep experimenting, and good luck with your game!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: April 5, 2025

    Is requiring authentication after 5 levels too restrictive for players, considering the balance between progression persistence and security concerns?

    anonymous user
    Added an answer on April 5, 2025 at 12:14 pm

    Player Authentication Dilemma It sounds like you're in a tough spot, and it's great that you're considering player feedback! Here are some thoughts that might help. Casual Play vs. Progress Persistence Since your game is intended as a casual experience, requiring an account might feel like too muchRead more

    Player Authentication Dilemma

    It sounds like you’re in a tough spot, and it’s great that you’re considering player feedback! Here are some thoughts that might help.

    Casual Play vs. Progress Persistence

    Since your game is intended as a casual experience, requiring an account might feel like too much for players who just want to have fun. You could think about optional authentication—like allowing each player to start without an account but giving them the option to sign up to save progress. This way, casual players can jump in without barriers, while dedicated players can secure their progress.

    Extending Levels Before Authentication

    Extending the levels before requiring authentication sounds like a solid plan! It would give players more time to enjoy the game and understand its mechanics. You could also introduce a temporary save feature that allows them to save their progress locally (while making it clear that progress might be reset if they don’t sign up).

    Balance Between Fun and Fairness

    Another idea could be to use soft limits on competitive features. For example, players could compete in leaderboards or challenges without needing an account initially, but to unlock certain game features or save their scores, they would need to register. This might keep the competitive spirit alive while not alienating casual players.

    Security Concerns

    Your concerns about security are totally valid, especially with competitive elements! One option could be a hybrid approach—using local storage for basic progress with an option for players to authenticate if they wish to secure their progress. This way, you’d have an extra layer of protection for those who choose it.

    Final Thoughts

    In the end, it’s all about finding that sweet spot between being casual-friendly and ensuring a fair gaming experience. You might even consider conducting a survey among players to gather thoughts on these suggestions. Listening to your player base can provide some valuable insights!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: April 5, 2025

    How can I stabilize my car’s drifting and turning mechanics in Unity to prevent flipping and uncontrollable spins?

    anonymous user
    Added an answer on April 5, 2025 at 10:14 am

    Drifting and Turning Issues in Unity Car Physics It sounds like you're really diving deep into car physics—awesome! Here are a few things you might want to try to help fix those drifting and flipping problems: 1. Adjust Center of Mass It could help a lot to lower the center of mass of your RigidbodyRead more

    Drifting and Turning Issues in Unity Car Physics

    It sounds like you’re really diving deep into car physics—awesome! Here are a few things you might want to try to help fix those drifting and flipping problems:

    1. Adjust Center of Mass

    It could help a lot to lower the center of mass of your Rigidbody. This will give your car more stability, especially when turning at high speeds. Try setting it something like (0, 0.5, 0) or lower and see how that affects flipping.

    2. Tweak the Grip

    For drifting, you might need to reduce the grip of the tires while you’re turning. You could implement a drift multiplier that reduces grip only when the car is sideways. This way, you keep control but still allow for some fun drifting!

    3. Implement Countersteering

    For countersteering, you could make it automatic! When your car starts to drift (like when it detects a slip angle), just apply a force in the opposite direction. You might want to limit this force to avoid over-correcting, which could lead to spinning.

    4. Smooth Transitions

    Try smoothing out the transition between acceleration and drifting. When your speed hits that sweet point for a drift (like above 80 km/h), gradually reduce grip instead of a sudden drop.

    5. Experiment with Suspension

    It sounds like you’ve got your suspension set to pretty high values. You could try lowering them to see how that affects your car’s handling. Sometimes a softer suspension provides more control.

    6. Use Raycasting Wisely

    Make sure your raycasting for wheel detection is hitting accurately. If the wheels think they’re off the ground, it might cause the car to act wonky. Check that your ground detection is working as intended!

    7. Play with Damping

    You mentioned you’re using damping—maybe take a look at that again. If it’s too stiff, it might not allow the car to settle during a turn, leading to flipping.

    Conclusion

    Finding that balance between grip and fun drifting can be tricky, so don’t hesitate to experiment! Try making small adjustments, and check how each change affects your car’s handling. Keep at it, and you’ll get there!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: April 5, 2025

    How can I effectively calculate a player’s skill rating using reaction rate and average reaction speed in my card game?

    anonymous user
    Added an answer on April 5, 2025 at 8:14 am

    Calculating Player Skill Ratings in Egyptian Rat Screw It sounds like you're on the right track thinking about Reaction Rate (R) and Average Reaction Speed (T). Both are key elements of quick reflex gameplay, and finding the right way to combine them will definitely enhance your skill rating system!Read more

    Calculating Player Skill Ratings in Egyptian Rat Screw

    It sounds like you’re on the right track thinking about Reaction Rate (R) and Average Reaction Speed (T). Both are key elements of quick reflex gameplay, and finding the right way to combine them will definitely enhance your skill rating system!

    Understanding the Metrics

    • Reaction Rate (R)
    • This could be calculated by taking the total number of successful reactions divided by the number of attempts in the last 15 matches. High engagement is essential.

    • Average Reaction Speed (T)
    • This should reflect the average time taken for players to react when they do respond correctly. Consider keeping track of their reaction times in milliseconds to get a precise average!

    Combining the Two Factors

    Now, for weighing the two metrics against each other, you might want to consider a formula like:

    Skill Rating = (C * R) - (D * T)
        

    Where C could be a constant that emphasizes the importance of reaction rate and D is a constant for the average reaction speed. Finding the right values for C and D through testing could help balance the importance of speed versus frequency.

    Incorporating Variance in Reaction Speed

    Looking at the range of reaction speeds (like fastest vs. slowest) could provide valuable insights! For instance, if a player’s reactions are usually quick but sometimes they have a drastically slower reaction, that could affect their overall skill rating. You could integrate this into your formula by adding a bonus or penalty based on the variance!

    Competitive Matchmaking

    Ultimately, you want to ensure that higher-rated players generally beat lower-rated ones. Therefore, testing and tweaking your rating system based on real game results will be vital. Think of your formula as a living entity that can evolve as you gather more data.

    Experiment with different weighting and see what works best! Good luck, and I can’t wait to hear how your system turns out!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: April 5, 2025

    How can I implement tiling and offset for multiple texture slots in my Unity surface shader?

    anonymous user
    Added an answer on April 5, 2025 at 6:14 am

    Texturing Troubles in Unity Surface Shader It sounds like you're dealing with a common issue when it comes to handling multiple texture slots in Unity shaders. You're right that you should be able to control the tiling and offset for both your albedo (_MainTex) and normal (_NormalTex) textures. TheRead more

    Texturing Troubles in Unity Surface Shader

    It sounds like you’re dealing with a common issue when it comes to handling multiple texture slots in Unity shaders. You’re right that you should be able to control the tiling and offset for both your albedo (_MainTex) and normal (_NormalTex) textures.

    The key thing here is that you need to use different UVs for each texture. It seems like you’re only using the UVs for _MainTex (IN.uv_MainTex) for both textures, which is why _NormalTex isn’t reacting to the tiling and offset settings you input.

    Here’s a rough idea of what you can do:

    1. Define a new set of UV inputs for your normal texture in your shader’s input structure. For instance, you could add float2 uv_NormalTex;.
    2. Then, when you’re doing the calculations in the shader, make sure to sample _NormalTex using this new UV set. You would write something like:
    3.         fixed4 normalSample = tex2D(_NormalTex, IN.uv_NormalTex);
              
    4. When you set the material properties in the Unity editor, you should be able to control Tiling and Offset for both the albedo and normal textures separately.

    Here’s a tiny code snippet to illustrate:

        struct Input {
            float2 uv_MainTex;
            float2 uv_NormalTex; // New UV for normal texture
        };
        
        void surf(Input IN, inout SurfaceOutputStandard o) {
            fixed4 albedo = tex2D(_MainTex, IN.uv_MainTex);
            fixed4 normal = tex2D(_NormalTex, IN.uv_NormalTex);
            // do something with albedo and normal
        }
        

    Also, don’t forget to define the tiling and offset parameters for your normal texture in the properties section of the shader, like this:

        _NormalTex ("Normal Map", 2D) = "white" {}
        _NormalTex_Tiling ("Normal Map Tiling", Vector) = (1, 1, 0, 0)
        

    Then make sure to read the tiling and offset values in your shader code and apply them to the UVs of _NormalTex. This way, you’ll maintain the integrity of your surface shading while having complete control over your textures!

    Good luck and happy coding!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
1 … 41 42 43 44 45 … 5,301

Sidebar

Recent Answers

  1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
  2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
  3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
  4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
  5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
  • Home
  • Learn Something
  • Ask a Question
  • Answer Unanswered Questions
  • Privacy Policy
  • Terms & Conditions

© askthedev ❤️ All Rights Reserved

Explore

  • Questions
  • Learn Something