• 0

C# (XNA) : 3D terrain and movement


Question

Basically I'm a beginner to 3D in C# and I was wondering if anyone knew any decent tutorials about collision with terrain and a model.

If someone wants to take the time to explain how the collision could work that'd be awesome - I'm not sure whether to import a 3D model of the terrain or create it using a height map - will the way collision is detected change depending on which method I chose?

Appreciate the help, hope someone can point me in the right direction.

Link to comment
https://www.neowin.net/forum/topic/888132-c-xna-3d-terrain-and-movement/
Share on other sites

5 answers to this question

Recommended Posts

  • 0
  On 30/03/2010 at 20:26, Haegr said:
If someone wants to take the time to explain how the collision could work that'd be awesome - I'm not sure whether to import a 3D model of the terrain or create it using a height map - will the way collision is detected change depending on which method I chose?
There's no reason you need to have different code for collision detection.

Basically terrain collision works like any other collision in 3D, you want to approximate your models (characters) using bounding boxes, spheres, etc., and check if they intersect with the terrain: only you can't approximate the terrain with bounding volumes (AFAIK), you test against each vertice in a certain radius around the character.

Of course there's no preventing you from coming up with more custom/optimized solutions, that's all the fun of game programming. I can imagine a system where you would average the terrain height around the character and place him a certain height above that average terrain height; he might interesect with some vertices, but it's probably faster.

See http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php for terrain generation using a height map.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Major privacy nightmare with no clear means of turning it off. What could go wrong?
    • They are still b-hurt about Apple allowing users to block their ability to see what you do across other apps too. Did Android also get this functionality? It’s been a while since using it.
    • Meta's next chatbot might message you first and want to keep talking to you by Usama Jawad Original robot image designed by Freepik Chatbots have been on the rise ever since the meteoric rise of ChatGPT back in January 2023. While large language models (LLMs), the technology powering chatbots, has various other use-cases, one of the most popular scenario for AI involvement continues to be chatbots. Now, it appears that Meta is considering making AI assistants even more proactive and talkative in future iterations. Leaked documents seen by Business Insider indicates that Meta is training AI chatbots that can message you unprompted to bring up past topics. Internally, the initiative is known as "Project Omni", and its aim is to increase user retention and engagement by providing more value to customers. Examples of proactive messages from the chatbot include an inquiry into your discovery of any new music composers, or checking if you require any movie recommendations for the night. A Meta spokesperson confirmed these plans to the news outlet, saying that "Like many companies, we're testing follow-up messaging with AIs in Meta's AI Studio. After you initiate a conversation, AIs in Meta AI Studio can follow up with you to share ideas or ask additional questions. This allows you to continue exploring topics of interest and engage in more meaningful conversations with the AIs across our apps." Contractors from data labeling firm Alignerr are reportedly helping Meta build different personas that can interact with the user. Once these capabilities become generally available in AI Studio, they will allow customers to create personalized chatbots that are specialized in particular areas, such as responding to fan messages across Meta's social media networks. It is important to note that this project is in active development, but an Alignerr contractor noted that it's been given to them as a "long-term project". The Meta spokesperson specified that follow-up messages to a conversation will only be sent on threads originally initiated by the user. If the user does not respond to this follow-up, no other messages will be sent. Follow-ups will be sent within 14 days of the original message and in order to be eligible, you have to have sent at least five messages to the chatbot in the previous two weeks. Other guidelines in the requirements document emphasize the need for the follow-up conversation to be positive, personalized, avoid harmful or sensitive content, and refer to something concrete from previous conversations. It will be interesting to see if this new way of interaction with AI chatbots changes the way we engage with them.
    • It would make more sense to do that, but instead it looks like he wants the batch script to display a message telling him to manually enable the VPN rather than getting the batch script to connect it for him.
  • Recent Achievements

    • Week One Done
      Devesh Beri earned a badge
      Week One Done
    • Week One Done
      956400 earned a badge
      Week One Done
    • First Post
      loose_observer earned a badge
      First Post
    • Week One Done
      BeeJay_Balu earned a badge
      Week One Done
    • Week One Done
      filminutz earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      444
    2. 2
      ATLien_0
      158
    3. 3
      +FloatingFatMan
      151
    4. 4
      Nick H.
      65
    5. 5
      +thexfile
      62
  • Tell a friend

    Love Neowin? Tell a friend!