Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SirSmileX · Jul 09, 2017 at 09:48 AM · meshtexture2dsplatmaps

Ingame splat mapping

Hey guys, so I'm planning on creating a game where you have to run and paint your surroundings to progress. You can switch between various paints that when touching them enable you to e.g. jump higher than usual. But I don't know how I should implement the firing of the paint itself and how the actual painting of the meshes happen. Furthermore I don't really know how to then detect whether the player is touching a color (if doing it with a splat map and alpha channels). Does somebody have an idea? I'm relatively new to unity.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by shrey150 · Jul 09, 2017 at 10:16 AM

The best way to go about something like this would be when firing, you spawn a GameObject with a Rigidbody and Collider and project it forwards. This can be a "blob" of paint. When it collides with a wall GameObject tagged with "paintable", you destroy the blob, set the paint property of the wall to the paint property that the blob had. The properties would be set in a script. Something like a WallScript and BlobScript that have variables that can either be predetermined (for the blob) or be changed (for the wall). You could have multiple blob prefabs for different colors and change those with a control.

For the painting effect, you'd probably spawn decals and changing the material of the wall. Either change material.coloror spawn in a colored "splat" decal where the blob hit the wall. That decal could be a texture that you make.

For the player moving only on certain colored floors/walls, you could set a variable in the player script for what they are currently allowed to travel on, then check the player's OnCollisionEnterand trigger a Game Over if they collide with the wrong wall.

Additionally, you could have a game manager that keeps track of the current traversable color, then disable walls' colliders that don't have that color. It would be more effective if a player falls through the map than a simple Game Over screen xD

I hope this helped, tell me if you need help with any specifics, and good luck with your game!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SirSmileX · Jul 09, 2017 at 10:31 AM 0
Share

Thank you! I found this video series by unity explaining what I need: https://unity3d.com/de/learn/tutorials/topics/scripting/introduction-and-session-goals?playlist=17117 . I'm just wondering how it might be possible to sort of let the splats "fuse".

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

78 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help with atlas.packtextures 0 Answers

How do I convert a Vector2 from a UV coordinate to an absolute pixel position? 1 Answer

How to overlap tiles in procedural meshes? 1 Answer

Baking vertices down to flat texture from shader 1 Answer

Dynamic face mesh from Kinect- applying a texture 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges