how can i make ingame object creation/level editor?
i want a function in my mobile game through which user can move his finger across the screen to make an object.the object can be any shape that user makes like a line a box or circle.the object should also have physical properties.Very similar to like the game Brain it on. its seems simple but as i am a beginner i dont know the exact way to do so kindly plz give any link to a tutorial or explain yourself. Thanks
It's actually not simple, you'll have to write the entire logic yourself. Thinking something is simple is the deadliest mistake you can make.
there must be some sort of documentation that can help
Answer by tebandesade · Jul 26, 2016 at 11:38 PM
Hi! Well regarding your input you can check this : - https://unity3d.com/learn/tutorials/topics/mobile-touch/mobile-development - https://docs.unity3d.com/Manual/MobileInput.html
Scripting: For a line :
Return the initialPos of the screen where you touched.
Return the endPos of the screen where you touched.
Create a line renderer (You first need to create a GO or include the Line to a current GO) https://docs.unity3d.com/Manual/class-LineRenderer.html
Assign the initialPos and endPos to the Linerenderer .
Set the linerenderer to useWorldSpace = false
Assign material you want
Add Rigidbody to the GO that contains the line to add physics properties.
Add what you want etc.
For a box, circle
Get the pos of the touch
Create a primitiveObject in that pos https://docs.unity3d.com/ScriptReference/GameObject.CreatePrimitive.html
Add Rigidbody for physics
Your answer
![](https://koobas.hobune.stream/wayback/20220612085336im_/https://answers.unity.com/themes/thub/images/avi.jpg)