Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i display, change the colour and move an object?

+5 votes
asked Jan 9, 2023 by human (250 points)
idk how to display stuff like an object. i also want to know how to change the size of the object.

1 Answer

0 votes
answered Jan 13, 2023 by Peter Minarik (86,040 points)

I'll make an assumption here that you're talking about 2D or 3D graphic objects in a scene.

Most graphics APIs offer you a property or setter function for the colour, position, scale, etc of an object in the scene, where the first property changes the ambient colour of the object, the scale can be used to change the size, so to speak via scaling the object and the position can be used to move the object.

There is often a material property that allows you to change the material and texture applied to the model (object) in the scene, which also affects the colour. The colour of the light sources also affects what colour the object is rendered.

Movement can be also changed by applying a force or inertia to an object.

The best answer to your question will always depend on the API or the graphics engine you're using.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...